$query=$db->prepare("SELECT *...
while($data=$query->fetch(PDO::FETCH_ASSOC)){...}
I have a query use while loop print out the data.
How can I check if while loop didn't fetch out any data(0 row from db), so I can print "0 result" on screen.
I don't want to make extra query for COUNT(*), is any way do check from while loop?