homepage Welcome to WebmasterWorld Guest from 54.161.175.231
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

    
sqlerror 1140
sqlerror 1140
amitsina




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

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




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

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?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved