Jump to content

Unexpected character in input: MySQL / PHP problem


amaceda

Recommended Posts

I've searched all over the internet and forums and can't find anything relating to this.  I hope you can help me.

 

I'm using this query to pull information from a table using an INNER JOIN.

 

$query="SELECT files._file_ID, file_name, file_descrip, add_date, status FROM files INNER JOIN sec_file_key sfk ON files._file_ID = sfk._file_ID WHERE sfk._sec_ID='$id'";

 

When I run the script, I get the following error:

 

Warning: Unexpected character in input: '' (ASCII=31) state=2 in ../display.php on line 120

 

If I comment out this line I don't get the error and the code works.  I brought this over from a development server and it worked fine.  I'm running all the same versions of Apache, php, MySQL, and Zend Optimiser.  magic_quotes_gpc and runtime is on.  I've tried add_slashes(), and every other method I could think of to escape quotes, but nothing changes that error code. 

 

I hope someone has some suggestions, this is driving my mad.

Link to comment
Share on other sites

I've searched all over the internet and forums and can't find anything relating to this.  I hope you can help me.

 

I'm using this query to pull information from a table using an INNER JOIN.

 

$query="SELECT files._file_ID, file_name, file_descrip, add_date, status FROM files INNER JOIN sec_file_key sfk ON files._file_ID = sfk._file_ID WHERE sfk._sec_ID='$id'";

 

When I run the script, I get the following error:

 

Warning: Unexpected character in input: '' (ASCII=31) state=2 in ../display.php on line 120

 

If I comment out this line I don't get the error and the code works.  I brought this over from a development server and it worked fine.  I'm running all the same versions of Apache, php, MySQL, and Zend Optimiser.  magic_quotes_gpc and runtime is on.  I've tried add_slashes(), and every other method I could think of to escape quotes, but nothing changes that error code. 

 

I hope someone has some suggestions, this is driving my mad.

 

did you read your own query ?

there is an ascii sign in the join sfk._file_ID WHERE

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.