you must first query sql statement and then count row.
USE WHERE `mapa`='1' and id <> '3'
Use following Example. and use according to your codes.
Example:
PHP
$sql="SELECT * from plugin WHERE cat = '$catid' and id <> '$id' order by id ASC LIMIT 30";
Skip the empty value from mysqli selects query.
Use: name != ''
id | name | country |
1 | Dhaka | Bangladesh |
2 | ||
3 | London | England |
1. Dhaka
2. London
Here skips 2 number rows which was empty
See the example.
Example:
MYSQLI
$sql = "SELECT * FROM data WHERE name != '' ORDER BY id asc LIMIT 10";
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';
}
?>