RE: [PHP] escaping ' when inside a " "

From: Date: Mon, 17 Nov 2003 21:55:37 +0000
Subject: RE: [PHP] escaping ' when inside a " "
Groups: php.general 
Request: Send a blank email to php-general+get-170019@lists.php.net to get a copy of this message
[snip] > If I have the SQL statement: > > $sql = "select subject from subwhile where subject = '*$var[0]*'"; Don't you want to do: $sql = "select subject from subwhile where subject LIKE '%$var[0]%'"; [/snip] Not if the variable is exactly what he is looking for.

« previous php.general (#170019) next »