I'm trying to simply select a few colums from a table (phID,phCOL)
+ the count of that certain select each time into a variable (coPHOTOS)
SELECT phID, phCOL, COUNT(phID) As coPHOTOS FROM photos
WHERE phGROUP='#grid#' AND phCOL IS NOT NULL
GROUP BY phCOL
I keep on getting an error: Column 'photos.phID' is invalid in the select
list because it is not contained in either an aggregate function or the GROUP
BY clause.
What is wrong? Thanks!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists