> Driving me mad.  Works if I put a string in quote marks instead of the
> variable $location.
> $result = mysql_query("SELECT shootID FROM shoots WHERE
> (location=$location)");
> This should work shouldn't it?  If it's a problem with the variable being
> embedded in the query what's the easiest way to overcome this?

$location is a string variable, yes?  If so, then your statement
needs to look like this:

$result = mysql_query("SELECT shootID FROM shoots WHERE
(location=\"$location\")");

Note the escaped quotes around $location.

Chris

Reply via email to