Jump to content

PHP and MS SQL Problem


carlg

Recommended Posts

I am using Microsoft SQL and PHP.

I have the following code



$sql = "SELECT j.Title AS title, j.JobType AS type, j.Location AS location, j.Requirements AS requirements,
j.SpecialRequirements AS special, j.Background AS background, CONVERT(TEXT,j.Description) AS description,
c.CategoryName AS category, c.JobCategoryID AS category_id
FROM tbJob j
INNER JOIN tbJobCategory c ON j.JobCategoryID = c.JobCategoryID
WHERE JobID = " . $job_id;
$result = $job_db->getRow($sql, DB_FETCHMODE_ASSOC);
print $result['requirements'];



The requirements field is a char(1000) in the database. When I select the row with query analyzer, it looks fine. So the data is stored in the DB properly.

When I print out requirements after the fetch, it gets truncated. Only the first 200 or 300 bytes display. Where should I start looking to debug this?

Any help is appreciated

Thanks
Carl



Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.