[SOLVED] sql query issue |
2/19/2010 8:17:25 PM |
PHPRunner General questions | |
R
Rens1976 author
Hi everyone Technical information Error type 256 Error description Unknown column 'bowel.Bristol_Scale' in 'having clause' URL demo.asprunner.net/rens1976_optusnet_com_au/bowel/bowel_list.php? Error file C:\UserAccounts\www\rens1976_optusnet_com_au\bowel_20100219043625\include\dbconnection.php Error line 34 SQL query select count() from (SELECT bowel.Bowel_ID, bowel.Home_ID, bowel.Resident_ID, bowel. date , bowel.Shift, bowel.Result , bowel.Bristol_Scale, resident.Surname, resident.First_Name,(SELECT count() FROM (SELECT bowel.Resident_ID FROM bowel INNER JOIN resident ON bowel.Resident_ID = resident.Resident_ID WHERE (bowel.date >= date_add(curdate(), interval-3 day)) GROUP BY bowel.Resident_ID HAVING bowel.Bristol_Scale <1) subQuery_cnt WHERE subQuery_cnt .Resident_ID =bowel .Resident_ID ) as Bowel record_cnt FROM bowel INNER JOIN resident ON bowel.Resident_ID = resident.Resident_ID where (bowel.date >= date_add(curdate(), interval-3 day)) GROUP BY bowel .Resident_ID having bowel .Bristol_Scale <1 ) aMore info Call stack File: line Function Arguments 0. include\dbconnection.php:34 db_query 1. select count(*) from (SELECT bowel.Bowel_ID, bowel.Home_ID, bowel.Resident_ID, bowel. |
|