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. Quote 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. Quote 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! Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.