lundi 9 février 2015

Why group_concat and SQL_CALC_FOUND_ROWS do not work with each other?


I have following query which contain group_concat and SQL_CALC_FOUND_ROWS together as I want result +total no of records present in it.



SELECT SQL_CALC_FOUND_ROWS GROUP_CONCAT(ca.id) FROM notification AS ca LEFT JOIN alert_msg AS an ON an.id=ca.alert_msg_id WHERE ca.mem_id='777 ' AND ca.date!="" AND ca.alert_msg_id NOT IN(26,27) AND ca.from_id != '777'

SELECT FOUND_ROWS();


But this does not return the desired result.


Please suggest.


thanks





Aucun commentaire:

Enregistrer un commentaire