Edward,
Thanks for your response.
I have tried what you suggested and I am still not getting the correct return. I am getting a fatal error : maximum execution time exceeded in .......php3 on line 25
line 25 starts with $newday in the while loop.
Do you have any other suggestions?
Thank you soooo much,
Cynthia
<?
// connect to server
$mysql_link = mysql_connect("localhost", "espc", "PUcYH47S");
//select the 'summitdaily_com' database
mysql_select_db("summitdaily_com", $mysql_link);
$today = date("Y-m-d") ;
//get everything from letters table
$query = "SELECT * FROM letters WHERE date = '$today' ";
$mysql_result = mysql_query($query, $mysql_link);
while(mysql_num_rows($mysql_result) == 0)
{
$newday = date("Y-m-d", mktime(0,0,0,date("m"),date("d")-1,date("Y")));
$query = "SELECT * FROM letters WHERE date = '$newday' ";
$mysql_result = mysql_query($query, $mysql_link);
}
while($row = mysql_fetch_row($mysql_result))
{
print("<br>");
print("<a href=$row[2]><font color=\"#000033\">$row[1]</font></a>");
print("<br>");
}
?>