Jump to content

[SOLVED] Using MAX() in the WHERE clause


davard

Recommended Posts

Getting an error when trying to do something like this:

 

select * from table where field<max(field)

 

Simple idea; select everything apart from the rows that have the largest value in one of the fields, but Mysql returns: "#1111 - Invalid use of group function". What's wrong/what should the query be?

Link to comment
https://forums.phpfreaks.com/topic/63764-solved-using-max-in-the-where-clause/
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.