Jump to content

[SOLVED] SQL count on results


jaminxz

Recommended Posts

Hello,

 

I have a sql join query which returns a set of records. I need to know how many records are returned, so i guess I need to use COUNT(!) somehow but i dont quite know how. Any suggestions would be warmly welcomed!

 

SELECT ID, t1.AD_No, LineNo, t2.Description, t2.CyclesLimit, t2.HourLimit, t2.DateLimit, t1.CompMethod, t1.Comments, STATUS, (!COUNT_OF_RESULTS!) 
FROM foo as t1
LEFT OUTER JOIN ad_item as t2
ON t1.AD_No= t2.AD_No
WHERE OPEN=1
AND STATUS=1
ORDER BY AD_No, LineNo

Link to comment
https://forums.phpfreaks.com/topic/146849-solved-sql-count-on-results/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.