error
Código:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND mp_from = 2' at line 1<br>error: UPDATE mensajes SET mp_read_from = 0 WHERE mp_id IN() AND mp_from = 2
Código PHP:
Ver original
function editMensajes(){ // // ARMAR IDS foreach($ids as $nid) { $nids[$id[1]][] = $id[0]; } $act = Security::antiSQL($_POST['act']); // HMM SI NO LE ENTIENDES A ESTO NTP YO TAMPOCO xD PERO FUNCIONA :D switch($act){ case 'unread': $this->db->ejecutarConsulta("UPDATE mensajes SET mp_read_to = 0 WHERE mp_id IN(".implode(',',$nids[1]).") AND mp_to = {$this->User->uid}"); $this->db->query("UPDATE mensajes SET mp_read_from = 0 WHERE mp_id IN(".implode(',',$nids[2]).") AND mp_from = {$this->User->uid}"); break; } }