Whimper, help :)

From: Date: Wed, 04 Dec 2002 04:06:36 +0000
Subject: Whimper, help :)
Groups: php.general 
Request: Send a blank email to php-general+get-126934@lists.php.net to get a copy of this message
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

« previous php.general (#126934) next »