PHP Implode But Wrap Each Element In Quotes

Add the quotes into the implode call: (I’m assuming you meant implode) $SQL = ‘DELETE FROM elements WHERE id IN (“‘ . implode(‘”, “‘, $elements) . ‘”)’; This produces: DELETE FROM elements WHERE id IN (“foo”, “bar”, “tar”, “dar”) The best way to prevent against SQL injection is to make sure your elements are properly … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)