Hi..
I am running this code to display all operation details when the page is loaded
$query = "SELECT * FROM OperationDetails WHERE Date='$date'";
if ( !($result = mysql_query($query,$link)) ) {
echo ("Error connecting to database");
} else {
if ( $result == 0 ) {
echo ("No operations booked");
} else {
.....display data
the problem i am getting is that when there are NO fields in the database for the current date the $result is not 0. When i try to echo the result it returns Resource id #3.......
can anyone tell me how i can make it display no operations booked when the query returns nothing ?? 😃 🙂