Welcome to WebmasterWorld Guest from 54.160.163.163

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

sqlerror 1140

sqlerror 1140

     

amitsina

7:29 am on Jan 10, 2009 (gmt 0)

5+ Year Member



im getting SQL error 1140 in the following code. The error goes away when I remove the WHERE statement but not otherwise. Can anyone please help me with the right syntax. Im a complete beginner here.
SELECT min(allusersinfo.alluserslevel) AS fdsfdsf, allusersinfo.allusersid
FROM allusersinfo
WHERE {$NXTFilter_Recordset1}
GROUP BY allusersinfo.allusersid
ORDER BY {$NXTSort_Recordset1}

DETAILS: I am using Dreamweaver Developer. I built this in Query Builder and the {$NXTFilter_Recordset1} comes from a dynamic list in Dreamweaver.

Any help is greatly appreciated.

brotherhood of LAN

9:30 pm on Jan 13, 2009 (gmt 0)

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



A list of MySQL error codes are here for future reference:
[dev.mysql.com...]

Error: 1140
SQLSTATE: 42000 ER_MIX_OF_GROUP_FUNC_AND_FIELDS
Message: Mixing of GROUP columns MIN,MAX,COUNT,... with no GROUP columns is illegal if there is no GROUP BY clause

Perhaps you can provide a snippet of data from your table as well as what the variables would hold?

 

Featured Threads

Hot Threads This Week

Hot Threads This Month