Richard, Thanks. Should I still include the die ? $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection);
$eventid = $link_date; $sql = 'SELECT * FROM '.$table.' where eventid like \''.$eventid.'\';'; $glquery = mysql_query($sql) or die("Invalid query: " . mysql_error()); $num_rows = mysql_num_rows($glquery); if ($num_rows > 0) { echo "<td width=100 height=100 align=left valign=top><a href=results.php?eventid=$link_date> $day </a></td>"; }else{ echo "<td width=100 height=100 align=left valign=top> $day </td>"; } Richard Davey wrote: > mysql_query will return FALSE if the query is invalid. > If the query is perfectly valid SQL, but just doesn't return > anything, then you need to use mysql_num_rows() instead - if this is > equal to nothing then nothing was returned. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php