Jump to content

Need help placing variable in query


thisagain

Recommended Posts

This query string works:


$query = 'SELECT * FROM `models` WHERE `fname` = CONVERT(_utf8 \'[color=red]Trains[/color]\' USING latin1) COLLATE latin1_swedish_ci';



...but I want to make [color=red]Trains[/color] a variable called $fname; however when I  try and change Trains to $fname, the query show up empty

if it helps, the variable $fname is passed onto the page by $fname=$_GET['name'];


If anyone can help me with this, it would be greatly appreciated.  Thanks
Link to comment
https://forums.phpfreaks.com/topic/15169-need-help-placing-variable-in-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.