MySQL Forums
Forum List  »  Spanish

Re: Ayuda para contar registros
Posted by: Jesús Uzcanga
Date: October 27, 2014 10:38AM

Salvador.

Debes utilizar la función CONUNT() de mysql además de la función de agrupación GROUP BY para contar los de cada idPost

Un ejemplo sería:


SELECT COUNT(*) as Cuantos from Comentarios GROUP BY idPost

recomendación: Debes plantear mejor y con más detalles tus dudas en el foro para que tengas más oportunidades de ser ayudado. (Está muy confuso lo que planteaste)

___________________________
Ing. Jesús Alfredo Uzcanga
Twitter: @JesusUzcanga

We learn the 20% of what we HEAR,
the 50% of what we SEE,
the 80% of what we DO and
the 95% of what we TEACH.

____________________________________________________________
https://www.linkedin.com/in/jauzcanga/

Options: ReplyQuote


Subject
Views
Written By
Posted
2206
October 25, 2014 04:08PM
Re: Ayuda para contar registros
979
October 27, 2014 10:38AM
1108
October 27, 2014 11:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.