foreach ($checkArray as $key => $value) {
$deleteUserStmt=$user_home->runQuery("DELETE FROM users WHERE userID = '".$key."' " AND " '".$value."'=1");
$deleteUserStmt->execute();
}
Am getting error:
Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1' at line 1
$checkArray $key is userID and value is true or false. RunQuery method working with other queries.
So I think I have problem with query syntax?