You are here: Mysql Variable help « PHP Language « IT news, forums, messages
Mysql Variable help

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация