If it is a string use the latter
mysql_query("SELECT something FROM table WHERE something='$something'")
otherwise use the former.
mysql_query("SELECT something FROM table WHERE something=$something")
I'm sorry but that is wrong.I was comparing it to a variable.
No matter if it's a variable or not, it still needs ' 's.
Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.
If you're not already familiar with forums, watch our Welcome Guide to get started.
Join over 807,865 other people just like you!