When the search matches all displays perfectly. But when there is no match the no result message does not display. Please any insight on this one. Thanks upfront
$result = "SELECT T1.ID, T2.Image1, T1.unoone, T1.unotwo, T1.unothree,
T1.unofour
FROM T1 LEFT JOIN T2 ON (T1.ID=T2.Image1)
WHERE T1.ID=T2.Image1 AND T1.unoone LIKE '%".$uno_one."%'
AND T1.unotwo LIKE '%".$uno_two."%'
AND T1.unothree LIKE '%".$uno_three."%'
AND T1.unofour LIKE '%".$uno_four."%' ";
$stmt = mysqli_stmt_init($con);
$query = mysqli_stmt_prepare($stmt, $result);
if(!$query) {
die("no result");
} else {
/* execute statement */
mysqli_stmt_execute($stmt);
/* bind result variables */
mysqli_stmt_bind_result($stmt, $id, $img[0], $uno_one, $uno_two,
$uno_three, $uno_four);
/* fetch values */
while (mysqli_stmt_fetch($stmt)) {
echo $img[0];
echo $uno_one;
echo $uno_two;
echo $uno_three;
echo $uno_four;
}
/* close statement */
mysqli_stmt_close($stmt);
}