simenss Posted September 18, 2007 Share Posted September 18, 2007 Hi, I want to check the value of a row in a MySQL-query that's defined just in the query. I thought of something like this: SELECT table.my_row AS `new_row` FROM `table` WHERE `new_row` = 'YES' But it doesn't work. I only get the error #1054 - Unknown column 'new_row' in 'where clause'. How do I check the value of a row that's defined just in the query (in this case) `new_row`? My MySQL client version is 5.0.37. Link to comment https://forums.phpfreaks.com/topic/69777-sort-by-query-defined-rows/ Share on other sites More sharing options...
Illusion Posted September 19, 2007 Share Posted September 19, 2007 remove backsticks on new_row and try. Link to comment https://forums.phpfreaks.com/topic/69777-sort-by-query-defined-rows/#findComment-351277 Share on other sites More sharing options...
fenway Posted September 21, 2007 Share Posted September 21, 2007 remove backsticks on new_row and try. That's right, don't escape your alias! Link to comment https://forums.phpfreaks.com/topic/69777-sort-by-query-defined-rows/#findComment-352379 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.