Jump to content

Sort by query-defined rows


simenss

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.