View Single Post
Old 09-03-2005, 09:11 AM   #5 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,487
sde is on a distinguished road
i guess it's all the same thing, but the original code just had single quotes inside single quotes which seemed to be the problem, so you could really just use double quotes like in red's last example and shouldn't have to escape the single quotes after that.

backticks arouind table names is proper i believe, but i haven't found that they are necessary unless you have a table name with spaces ( i think )

i'm too lazy to check, but if you escape single quotes when they don't need to be escaped, will that generate an error?

most of my queries are formatted in this style:

PHP Code:
 $query="SELECT * FROM memfiles WHERE field = '{$field}' "
__________________
Mike
sde is offline   Reply With Quote