Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Using SQL Aggregate Functions (How to use MAX, AVE, SUM, etc.)
Re: Using SQL Aggregate Functions [message #1296 is a reply to message #1289] Tue, 25 March 2008 21:19 Go to previous messageGo to previous message
melvinsdb is currently offline  melvinsdb
Messages: 16
Registered: November 2006
Location: Philippines
Junior Member

While I prefer the same option, unfortunately some cases use keys mixing alpha and trailing numeric. I did try to use the second suggestion but got this...

2008-03-26 01:15:28

Fatal Error: MySQL error: 1140 - Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause (# 1140).

SQL query: SELECT SQL_CALC_FOUND_ROWS MAX(`student_id`) AS student_id, crs_class.class_name FROM crs_student LEFT JOIN crs_class ON (crs_class.class_id=crs_student.class_id)

Error in line 451 of file 'E:\xampp\htdocs\radicore\includes\dml.mysqli.class.inc'.

Host Info: localhost via TCP/IP
Server Version: 5.0.51
Client Info: 5.0.51, Client Encoding: latin1

Script: /radicore/classroom/student_add.php

I decided to include a $this->sql_groupby = "...." to make it work. but this is just a temporary measure

Thanks
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: creating list items
Next Topic: How do you deploy your app?
Goto Forum:
  


Current Time: Fri Sep 27 02:28:59 EDT 2024

Total time taken to generate the page: 0.03210 seconds