1
I’m trying to assign more than one search criteria in the database and I can’t find anything that can help me. I’ll explain it better:
I have a database with a "city" field, where I want the daos assigned to that city to be returned. However, I wish another nearby city to be included as well, but I would not like to do this with an auxiliary table.
I’ve seen this being used with commas in the forms, but I have no idea how to do this in the query.
$acha = mysqli_query("
SELECT *
FROM pe_basedecisao
WHERE cidade = 351015, 351013");
You can use a
OR
on condition as I understandSELECT * FROM pe_basedecisao WHERE cidade = 351015 OR cidade = 351013
– Vinicius Shiguemori
SELECT * FROM pe_basedecisao WHERE cidade IN ("351015", "351013");
– AnthraxisBR
Thank you guys!
– Webster Moitinho