When a record is selected from the database, there is a section of the page which will show all "notes/annotations" for this record by the user.
However, if there are no records, the section is blank. I would like for a message to appear that reads "no notes for this record have been entered" instead of it being blank.
// get all notes for a job requirement
$sql = "SELECT * FROM jobnotes_table WHERE jobID = '$jobID' ORDER BY date DESC";
// query the datebase
$result = mysql_query($sql);
// HOW DO I DO THIS PART???
// I would like the IF to occur when there are no notes
if ($result == FALSE) {
echo "currently no notes";
}else{
// display results method (this part works fine)
}
How would I write this IF statement??? php.net says the value returned on a MYSQL_QUERY is either a referrer or a FALSE.......... what i'm trying here is not working.....
Any thoughts