John Taylor-Johnston wrote:
Bao or anyone,Gee, I was goofed up by your last $sql:) Now you can check if it returns NULL by
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.
if (!$glquery)
Best
Bao
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:
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php