tanhaha_how
12-06-2006, 09:58 AM
hello, how to show all records from database....(i mean row by row).for my code, i jz can only show the last record....y???
$query = "SELECT * FROM tblpatient";
$result = mysql_query($query);
$row = mysql_fetch_assoc($result);
while ($row = mysql_fetch_assoc($result)){
echo $row['Name'];
echo '<br/>';
echo $row['Address'];
}
can anyone pls help me???thank u very much:o
$query = "SELECT * FROM tblpatient";
$result = mysql_query($query);
$row = mysql_fetch_assoc($result);
while ($row = mysql_fetch_assoc($result)){
echo $row['Name'];
echo '<br/>';
echo $row['Address'];
}
can anyone pls help me???thank u very much:o