I am trying to test whether record for particular condition exist or not.
$con = new mysqli('127.0.0.1', 'root', '', 'mysql');
if ($con->query("select count(*) from userpost where userid = 1000004") != null)
{
echo "exist";
}
else
{
echo "not exist";
}
is this correct way?
or let me know if anything better