how can i display the record after updating?
Here is my coding:
<?php
$sql="UPDATE library set STATUS = 'AVAILABLE', RESERVED_DATE = null, MEMBERSHIP_NO = null where date_add(reserved_date, interval 2 day)< '$today' and status ='RESERVED' ;";
$result=mysql_query($sql,$db);
if ($result)
{
$numrows = mysql_num_rows($result);
?>
<p class='text'><?echo $numrows;?> records updated.</p>
<?php
while ($myrow = mysql_fetch_array($result)) {
?>
<p class='text' ><?echo $myrow["ID"];?></p>
No value return from mysql_num_rows and mysql_fetch_array. Error display as "Warning: Supplied argument is not a valid MySQL result resource "
I also try to use mysql_fetch_rows but same problem.
However, when I change to use SELECT statement, it is successful.