Bao or anyone, Here is my code. $sql works correctly, but am not sure I did this line correct:
$glquery = mysql_query($sql); because "if ($glquery)" always returns something. I want to know if it returns NULL. Thanks for your time, John -----------snip----------------- $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $eventid = $link_date; $sql = 'SELECT * FROM '.$table.' where eventid like '.$eventid.';'; #echo $sql; #SELECT * FROM GMCalendar where eventid like 2004-02-16; $glquery = mysql_query($sql); if ($glquery) { echo "<td><a href=results.php?eventid=$link_date> $day </a></td>"; }else{ echo "<td> $day </td>"; } Bao Ruixian wrote: > John Taylor-Johnston wrote: > >$sql = 'SELECT * FROM '.$db.'.'.$table.' where eventid like '.$eventid.';'; > >if ($sql ??) > This will do: > if ($sql) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php