mysql_fetch_assoc fetching only one record

gribliort

New Member
I have an array with the result of a query:\[code\].....some code.....$result = mysql_query("SELECT * FROM vttest");$row = mysql_fetch_assoc($result);print_r($row);\[/code\]But it only prints one record, I can't put $row in a loop because I will be working on sorting that variable later.\[code\]Array( [id] => 3 [rep] => Mike [name] => Joe [department] => Business [location] => Room 1 => [email protected] [phone] => 519-123-4567 [type] => Visit [drink] => Coffee [notes] => Some notes [lastVisited] => 2010-08-27 [nextVisit] => 2010-08-27)\[/code\]I know there are more records than that, how can I print all of it while still being able to work with the $row variable?
 
Back
Top