Or, maybe there's a way to check if a record exists with a certain value.
SELECT column_name(s) FROM table_name WHERE column_name operator value
	# $dbh is the connection to your database
 
$sql = "SELECT name, city  FROM customer_table WHERE state='CA' " ;
 
$result = mysqli_query(  $dbh , $sql ) ;
 
if( $result === false ){
   # HANDLE ERROR ;
} elseif ( mysqli_num_rows( $result ) == 0 ) {
   # HANDLE  NO MATCH 
} else {
   # HANDLE AT LEAST ONE MATCH
}
	Notionally, the empty set. Relational DBMSs, such as MySQL, are modeled after relationships, which are relations ([2]) where you don't care about domain order. In RDB parlance, "table" is synonymous with "relationship". An SQL statement creates a new relationship by joining, filtering and sorting other relationships. If a join or a filter results in no tuples (rows), the result is an empty set.I know that code, but I need to know what it returns if it finds no match to the value.