amaceda Posted February 14, 2008 Share Posted February 14, 2008 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 https://forums.phpfreaks.com/topic/91136-unexpected-character-in-input-mysql-php-problem/ Share on other sites More sharing options...
NL_Rosko Posted February 14, 2008 Share Posted February 14, 2008 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 https://forums.phpfreaks.com/topic/91136-unexpected-character-in-input-mysql-php-problem/#findComment-467082 Share on other sites More sharing options...
amaceda Posted February 14, 2008 Author Share Posted February 14, 2008 Thanks. I still haven't seen it on my computer. I opened it in different editor, still didn't see it. Retyped the offending characters and it's fixed. Link to comment https://forums.phpfreaks.com/topic/91136-unexpected-character-in-input-mysql-php-problem/#findComment-467087 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.