RE: [PHP] Whimper, help :)

From: Date: Wed, 04 Dec 2002 05:31:50 +0000
Subject: RE: [PHP] Whimper, help :)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-126939@lists.php.net to get a copy of this message
what are the field types in the mysql DB? > -----Original Message----- > From: John Taylor-Johnston [mailto:taylorjo@collegesherbrooke.qc.ca] > Sent: Wednesday, 4 December 2002 4:13 PM > To: php-general@lists.php.net > Subject: Re: [PHP] Whimper, help :) > > > Tom, > Anyone, > > No I'm not looking for a ", I'm trying to pass double quotes into MySQL. > Like I said, it works when debugging: > > > http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+ > maria%26quot%3B > http://ccl.flsh.usherb.ca/print/display.test.inc.phps > > but fails when I try to pass my double quotes in: > > > http://ccl.flsh.usherb.ca/print/index.html?search=%26quot%3Bready+ > maria%26quot%3B > http://ccl.flsh.usherb.ca/print/display.table.inc.phps > > $sql = "SELECT id,AU,ST,BT,AT FROM $table WHERE MATCH > (TNum,YR,AU,ST,SD,BT,BC,AT,PL,PR,PG,LG,AUS,KW,GEO,AN,RB,CO) > AGAINST ('".stripslashes($search)."' IN BOOLEAN MODE) ORDER BY id > asc"; > > I already have the <input type=text name=search> $search > > I have tried many variations. > > > If you are looking for " in a string just quote it with ' > > example > > $like = '"ready maria"'; > > $ sql = " SELECT .......... WHERE .... LIKE '$like'"; > > no need to escape anything > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.general (#126939) next »