darkangel220 Posted April 24, 2006 Share Posted April 24, 2006 I've been having a bit of a problem with getting some information from the mysql database.The problem I wanted to solve was to have all the information that containted the word Amature in the rank colom to only be displayed.This part of the script.$sql = 'SELECT * FROM `Cooking_guild` WHERE `rank`=Amateur ORDER BY `lvl_cap` ASC ';For some resion it comes up with this error:Unknown column 'Amateur' in 'where clause'But if I replace the word with a number like 500 there is no error at all, but cause I wanted all the amaterur rank info displayed and since 500 is not even a rank it dose not work.Where am I going wrong here? Link to comment https://forums.phpfreaks.com/topic/8287-solved-php-code-where-cause-dose-not-work/ Share on other sites More sharing options...
rab Posted April 24, 2006 Share Posted April 24, 2006 your listing your columns wrongtry this[code]$sql = "SELECT * FROM Cooking_guild WHERE rank='Amateur' ORDER BY lvl_cap ASC ";ect..[/code] Link to comment https://forums.phpfreaks.com/topic/8287-solved-php-code-where-cause-dose-not-work/#findComment-30219 Share on other sites More sharing options...
darkangel220 Posted April 24, 2006 Author Share Posted April 24, 2006 Thank you so much for this.I've been out of php for a good year, so I'm kind of new again.This has solved my headace./bow Link to comment https://forums.phpfreaks.com/topic/8287-solved-php-code-where-cause-dose-not-work/#findComment-30220 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.