This should be simple but I can not get the "if ($result === FALSE)" in the below code to work when no matching records are found. It works just fine if records are found but does not work if no records are found. Can someone point out what I doing wrong?
Thank you Kevin.
$SQL = "SELECT * FROM Master WHERE (Title like '%".$SeachFor."%') or (Keywords like '%".$SeachFor."%') ORDER BY Title" ;
$result = mysqli_query($GLOBALS["connection"], $SQL);
if ($result === FALSE) {
echo 'No results found';
} else {
$num_rows = mysqli_num_rows($result);
$Counter = 1;
$DisplayedCounter = 1;
?>
<?php require_once('displayproduct.php'); ?>
<?php
}
?>