Quote:
Originally Posted by harmor19
Would "GROUP BY scst_feedback.feedbackid" work?
|
Thanks for suggestion harmor, however unfortunately it doesn't work. I'm trying to fiddle around with that in conjunction with a HAVING clause, but i'm not too familiar with it.
I tried the following, but no luck either...
Code:
SELECT scst_t.*, scst_ttype.ttype, scst_tm.tmtitle, COUNT(scst_fb.fbid) AS fbqty
FROM scst_t
LEFT JOIN scst_ttype ON scst_ttype.ttypeid = scst_t.ttypeid
LEFT JOIN scst_tm ON scst_tm.tmid = scst_t.tmid
LEFT JOIN usergroup ON usergroup.scstugtmid = scst_t.tmid
LEFT JOIN scst_fb ON scst_fb.tid = scst_t.tid
GROUP BY scst_t.tid
HAVING fbqty <= scst_t.recurring
ORDER BY scst_t.enddate ASC, scst_tm.tmtitle ASC