Martin,
Anyone,

I'm desperate :( PHP isn't sending my SQL correctly. It's not a MySQL problem. It's my 
PHP syntax.

Debugging:
http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26quot%3B

$sql = 'SELECT ... FROM '.$table.' WHERE MATCH ... AGAINST
(\'"ready maria"\' IN BOOLEAN MODE) ORDER BY id asc';

Yay ... :) it works!!! (http://ccl.flsh.usherb.ca/print/display.test.inc.phps)

If I copy & paste this SQL into PHPMyAdmin, it works.

BUT IT WON'T WORK IN PHP. The code belows echos $sql correctly, but MySQL thinks it 
received:

+ready +maria

not

"ready maria"

See: http://ccl.flsh.usherb.ca/print/index.html?search=%26quot%3Bready+maria%26quot%3B

  $sql = 'SELECT ... FROM '.$table.' WHERE MATCH ... AGAINST
  (\''.stripslashes($search).'\' IN BOOLEAN MODE) ORDER BY id
  asc';

  $sql = "SELECT ... FROM `$table` WHERE MATCH ... AGAINST
  ('".stripslashes($search)."' IN BOOLEAN MODE) ORDER BY id
  asc";

  See (http://ccl.flsh.usherb.ca/print/display.table.inc.phps)

What is the correct PHP syntax to get MySQl to read my SQl correctly?
What am I f***ing up?

John




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to