I need proper syntax/procedure for inserting a variable into a SELECT query...
Hello All,
Here's what I want to do:
Take this - $sql = 'SELECT name FROM galleries WHERE spec = XYZ'
where XYZ is a variable passed down from a query string.
What is the proper syntax/procedure for placing a variable in the above statement? I'm trying everything I can think of to no avail.
ADDED:
Maybe more info will be helpful. I only want to pick records out of the 'galleries' table whose 'spec' record is equal to the value of the query string selected on the previous page. Does that make sense? I feel I'm going nuts in the head and may not be explaining myself the best.
Thanks in advance for any help you can offer!
Sincerely,
wordman
