forumnz Posted February 3, 2008 Share Posted February 3, 2008 This: <?php $cuisines = "AND (c1 LIKE '%$cuis%' OR c2 LIKE '%$cuis%' OR c3 LIKE '%$cuis%' OR c4 LIKE '%$cuis%' OR c5 LIKE '%$cuis%')"; ?> Gives this error: Warning: Unexpected character in input: '\' (ASCII=91) state=1 in /usr/local/www/vhosts/site/httpdocs/Browse/index.php on line 419 What do I need to do? Thanks, Sam. Quote Link to comment Share on other sites More sharing options...
trq Posted February 3, 2008 Share Posted February 3, 2008 Can you echo your entire query and show us? Quote Link to comment Share on other sites More sharing options...
forumnz Posted February 3, 2008 Author Share Posted February 3, 2008 <?php if($cuis != '' && $cuis != '0')\ { $cuisines = "AND (c1 LIKE '%$cuis%' OR c2 LIKE '%$cuis%' OR c3 LIKE '%$cuis%' OR c4 LIKE '%$cuis%' OR c5 LIKE '%$cuis%')"; } $query = "SELECT count(*) FROM fflists WHERE $op='$trim' AND (keywords LIKE '%$key%' OR business_name LIKE '%$key%') $cuisines AND active='1'"; ?> Is that right? Quote Link to comment Share on other sites More sharing options...
trq Posted February 3, 2008 Share Posted February 3, 2008 Now... echo $query; and show us. Quote Link to comment Share on other sites More sharing options...
forumnz Posted February 3, 2008 Author Share Posted February 3, 2008 SELECT count(*) FROM fflists WHERE oid='0' AND (keywords LIKE '%%' OR business_name LIKE '%%') AND active='1' Quote Link to comment Share on other sites More sharing options...
trq Posted February 3, 2008 Share Posted February 3, 2008 Sorry, I was looking for n sql error. Its a php error (having a shocker today). Can wee see 10-15 lines prior to and including line 419. Quote Link to comment Share on other sites More sharing options...
forumnz Posted February 3, 2008 Author Share Posted February 3, 2008 I think this is the one you want: $cuis = trim($cuisine); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.