Why it returns only one match?

Hello. Tell me, please, already tried that and and so why the database returns only the first match? How to get all?
$result2 = mysql_query("SELECT * FROM coments WHERE id_q='$q'",$db);
$myrow2 = mysql_fetch_array($result2);
var_dump($myrow2);
July 9th 19 at 13:43
2 answers
July 9th 19 at 13:45
Solution
while ($myrow2 = mysql_fetch_array($result2)) {
var_dump($myrow2);
}

PS But even so, nobody does.
thank you very much - Michale80 commented on July 9th 19 at 13:48
: Check post solution. =) - Carli commented on July 9th 19 at 13:51
July 9th 19 at 13:47
Where b*d you find this code??? Let me burn these servers!!!!

Well, there are also normal resources!
So you have your code - Michale80 commented on July 9th 19 at 13:50
If you think that you should write differently, show - Carli commented on July 9th 19 at 13:53
How to do it? - Shana_Hal commented on July 9th 19 at 13:56

Find more questions by tags MySQLPHP