I seem to be having some difficulties with retrieving data from Mysql.
I tried this in PhpMyAdmin SQL:
SELECT *
FROM `ads1`
WHERE state IN ( 'Romania , Germany' )
and the code works but nothing gets returned.
I have a table with value in it and a PHP variable having this format: name1,name2,name3,....,nameN, all in one variable.
Now the idea is that if the table value is contained in the PHP variable, the row get's selected.
Do you guys suggest anything?
WHERE state IN ('Romania', 'Germany'). Also note that if your database is not case insensitive you will not get results if your search isn't the same case. To be honest, this seems like you're not really up to speed on this, and you'd be better suited reading tutorials. Make sure you read up on SQL Injection attacks and how to prevent them.