I have this Select query, I want to select one row from mysql table, where id = $id, and has "x_name" or "y_name" 'yes'.
But it returns more rows.
Code: Select all
$insert_cat = $mysqli->query("SELECT * FROM `prod_site` WHERE id = $id AND x_name = 'yes' OR y_name = 'yes'");
I don't know what is wrong in this query.