Another rookie question; How to implement Count() here?

Posted by Camran on Stack Overflow See other posts from Stack Overflow or by Camran
Published on 2010-05-06T15:28:48Z Indexed on 2010/05/06 15:38 UTC
Read the original article Hit count: 518

Filed under:
|
|
|

I have this query:

SELECT mt.*, fordon.*, boende.*, elektronik.*, business.*, hem_inredning.*, hobby.*
FROM classified mt 
LEFT JOIN fordon ON fordon.classified_id = mt.classified_id 
LEFT JOIN boende ON boende.classified_id = mt.classified_id 
LEFT JOIN elektronik ON elektronik.classified_id = mt.classified_id 
LEFT JOIN business ON business.classified_id = mt.classified_id 
LEFT JOIN hem_inredning ON hem_inredning.classified_id = mt.classified_id 
LEFT JOIN hobby ON hobby.classified_id = mt.classified_id 
ORDER BY modify_date DESC

I need to implement a count here, to just count all rows in combination with the JOINS you see.

How should I do this?

SELECT COUNT(mt.*, fordon.* etc) FROM ? // This method wont work

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql