Hi
I have a database in MySQL (LAMP) and im trying to display all records in the table. I have been fighting with this quite a bit but can only get the first record in the table to display
<?php
mysql_select_db($database_dsa, $dsa);
$query_GetAlert = "SELECT * FROM Alerts";
$GetAlert = mysql_query($query_GetAlert, $dsa) or die(mysql_error());
$row_GetAlert = mysql_fetch_assoc($GetAlert);
$totalRows_GetAlert = mysql_num_rows($GetAlert);
$num=mysql_num_rows($totalRows_GetAlert);
$row = mysql_fetch_array($row_GetAlert);
?>
<?php echo $row_GetAlert['AlertDescription']; ?>
<?php
mysql_free_result($GetAlert);
?>
Can someone tell me what is wrong with this? any help is appreciated.
Thanks
I have a database in MySQL (LAMP) and im trying to display all records in the table. I have been fighting with this quite a bit but can only get the first record in the table to display
<?php
mysql_select_db($database_dsa, $dsa);
$query_GetAlert = "SELECT * FROM Alerts";
$GetAlert = mysql_query($query_GetAlert, $dsa) or die(mysql_error());
$row_GetAlert = mysql_fetch_assoc($GetAlert);
$totalRows_GetAlert = mysql_num_rows($GetAlert);
$num=mysql_num_rows($totalRows_GetAlert);
$row = mysql_fetch_array($row_GetAlert);
?>
<?php echo $row_GetAlert['AlertDescription']; ?>
<?php
mysql_free_result($GetAlert);
?>
Can someone tell me what is wrong with this? any help is appreciated.
Thanks