Hi friends,
I don't know whether this thread is related to this forum or php forum.
Please forgive me, if i had done this mistake.
Can anyone tell me is it possible to write a query attached with php variable in where clause?
for example,
[CODE=text]$nm=implode("," ,$si[name]);
$result=get_rec ords_sql("selec t name, id from a where name in ($nm)");
echo $result;[/CODE]
But this query shows me the following error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'something' at line 1.
can anybody tell me what is it and what i have to do to fix this?
Please help me out.
Thanx n Regards
Yas...
I don't know whether this thread is related to this forum or php forum.
Please forgive me, if i had done this mistake.
Can anyone tell me is it possible to write a query attached with php variable in where clause?
for example,
[CODE=text]$nm=implode("," ,$si[name]);
$result=get_rec ords_sql("selec t name, id from a where name in ($nm)");
echo $result;[/CODE]
But this query shows me the following error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'something' at line 1.
can anybody tell me what is it and what i have to do to fix this?
Please help me out.
Thanx n Regards
Yas...
Comment