mysql - SQL Query to Select Everything Except the Max Value -


I have a complex query that captures data from three tables, and now I want to make it even more complicated (Oh dear )!

I want to display the feature of the previous post in my own section of the page, and this is very easy by choosing the last entry in the table. However, for complex queries (the main page of the site), I am unable to display this feature.

I want to union after querying my previous query, but it is not returning the correct result:

  SELECT features.featureTitle AS Title, features.featureSummary AS body, features.postedOn AS Dummy, DATE_FORMAT (Features Posted, '% M% d,% Y') AS Post, Zero, Zero, Employee. Staff name, FEATURES FEATURES FEATURES FEATURED FEATURED FEATURES = staff.staffid where features Posted on! = Dummy DESC LIMIT by the MAX (features.postedOn) command LIMIT 0,15  

This query returns the following error:

MySQL error: # 1111 - Groups Invalid use of the function

Is there a way around this?

maximum query should be in its own subkey, so your last SQL Shaw Uld be ::

  SELECT features.featureTitle AS Title, FEATURES. Features Social ASS body, features.postedOn AS Dummy, DATE_FORMAT (FEATURES. PostOffice, '% M% D,% Y') FEATURES = Staff from AS Features. Staffid where FEATURES. Posted on! = (Select max (features.postedOn)),  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -