What should I replace \'CODE TO VERIFY IF QUERY RESULT ROW IS = 1\' for?
I\'ve tried many ways using num_rows but it won\'t work.
My PHP code:
you could just do
if($row = mysqli_fetch_assoc($query)) {
}
also you may want to save your username and password in one file as constants
$query->num_rows;
or
mysqli_num_rows($query);
You can use:
$stmt=$mysqli->prepare("select `id` from `agahicustomer` where `city`=?");
$stmt->bind_param("s",$cityid);
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($id);
return $stmt->affected_rows;
$stmt->close();
Also you can use this sql query :
Select count(*) from table