mysql - How to set a variable in where clause of Select query in php -
while executing below query i'm not getting sucess value
$name=qwe; $result = mysql_query("select *from user name = $name");
instead of above query if put below, can able appropriate ans:
$result = mysql_query("select *from user name = 'qwe'");
can give solution first query??
close variable in quote , concatenate string query
$name= "qwe"; $result = mysql_query("select *from user name = '".$name."'");
one more note please use mysqli security purposes. thanks
Comments
Post a Comment