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,
Expand|Select|Wrap|Line Numbers
- $nm=implode(",",$si[name]);
- $result=get_records_sql("select name, id from a where name in ($nm)");
- echo $result;
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...