mysql - SELECT WHERE IN query using text string -
i've had bit of around, , tried few things, can't seem work... can help?
$typeall = " ('house','condo','loft','townhouse','land')"; $rs = mysql_query("select * 'houses' , category in " .$typeall);
does not work
but if type
$rs = mysql_query("select * 'houses' , category in ('house','condo','loft','townhouse','land')");
it works perfect, why?
thanks.
try this:
$typeall = "'house','condo','loft','townhouse','land'"; $rs = mysql_query("select * 'houses' , category in (".$typeall.")");
may variable $typeall not working in brackets.
Comments
Post a Comment