w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How do I display an error message that it couldn't find any results

By mysqli_num_rows() you can count the number of rows having data in the table.

$row_cnt = mysqli_num_rows($result);

if($row_cnt > 0){
  //data exist for it 
}else{
  //Display your error message here
}




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.