you must first query sql statement and then count row.
![]() |
you are not running the sql statement by using
mysqli_query you must first query sql statement and then count row. |
See the example.
Example:
PHP
<?php
$conn = mysqli_connect("127.0.0.1", "my_user", "my_password", "my_db");
/*mysqli connection*/
$check = mysqli_real_escape_string($link, $_REQUEST['email']);
$sql = "SELECT * FROM users WHERE email = '$check'";
$res = mysqli_query($conn,$sql);
if (mysqli_num_rows($res ) == 0){
echo 'Number of Row 0';
} else {
echo 'Row available';
}
?>
mysqli num rows |
How to exclude a specific row from mysqli select record | Mysqli Select Tutorial |
How to exlude empty value from selecting mysqli row | Mysqli Select Tutorial |
How to Check if exist in database mysqli_num_rows | Mysqli Select Tutorial |
Read Full: | Mysqli Select Tutorial |
Type: | Develop |
Category: | Web Tutorial |
Sub Category: | Mysqli Select Tutorial |
Uploaded by: | Admin |
Views: | 92 |