A
Anonymous
Guest
Hi,
I am attempting to display all records from the database but the following code
only displays the last record ??
$query="SELECT * FROM table";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$caID=mysql_result($result,$i,"caID");
$caCuNo=mysql_result($result,$i,"caCustomerNo");
$caDOD=mysql_result($result,$i,"caDODdisplay");
$caDOT=mysql_result($result,$i,"caDropOffTime");
$caPUD=mysql_result($result,$i,"caPUDdisplay");
$caPUT=mysql_result($result,$i,"caPickUpTime");
$caDays=mysql_result($result,$i,"caDays");
$i++;
}
?>
Any Ideas
Thanks
I am attempting to display all records from the database but the following code
only displays the last record ??
$query="SELECT * FROM table";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$caID=mysql_result($result,$i,"caID");
$caCuNo=mysql_result($result,$i,"caCustomerNo");
$caDOD=mysql_result($result,$i,"caDODdisplay");
$caDOT=mysql_result($result,$i,"caDropOffTime");
$caPUD=mysql_result($result,$i,"caPUDdisplay");
$caPUT=mysql_result($result,$i,"caPickUpTime");
$caDays=mysql_result($result,$i,"caDays");
$i++;
}
?>
Any Ideas
Thanks