I would like to know if i\'m doing fine OR fetchAll() doesn\'t work with WHILE.
here is an exemple
$db=new PDO(\"mysql:host=\" .$dbhost. \"; dbname=\
With fetchAll In while loop you have fetched all records in the first iteration and there is nothing to fetch the next time. In foreach also you have fetched all records in the first line, but foreach uses the result for iteration.
fetchAll
foreach