Hello, in general there are many, many posts, each post has t.location
and t.id_city
, the full address is written in the location
for example: "Russia, Yekaterinburg, Pushkin st., 7", So, you need to pull out of the database data on the city, how best to do it:
SELECT * FROM post t WHERE t.id_city = :id_city
or
SELECT * FROM post t WHERE t.location LIKE %:location% //:location => 'Екатеринбург'
I will be very happy if you give a better option