Posted by Rivera on 09/07/05 03:31
Hello,
Im playing around with mysql in php and i have occurred this problem.
if i use:
$query = $db->getAll("SELECT * FROM music WHERE (title = \"Led
Zeppelin\")");
i get exactly what i want but if i use
$album = "Led Zeppelin";
$query = $db->getAll("SELECT * FROM music WHERE (title = $album)");
i get:
Query Failed DB Error: no such field
do i need to chop or do something get variables to work in the field instead
of the exact same string constant?
thanks,
Ricky
Navigation:
[Reply to this message]
|