php check if value exists in database code example
Example 1: how to ckeck that email is present in databse in mysqli
$select = mysqli_query($connectionID, "SELECT `email` FROM `game` WHERE `email` = '".$_POST['email']."'") or exit(mysqli_error($connectionID));
if(mysqli_num_rows($select)) {
exit('This email is already being used');
}
Example 2: mysql check if value exists
mysql> SELECT EXISTS(SELECT * from ExistsRowDemo WHERE ExistId=105);