Folgender Code:
Inserted immer wider neue Zeilen, egal wie oft ich es aufrufe;
Das Echo in der Mitte gibt folgendes aus:
perm_page_id und perm_group_id beinhalten keine Tippfehler und haben definitiv die entsprechenden Werte.
Hat jemand ne Idee?
Code:
$mysql->query("UPDATE ".MYSQL_TABLE_PREFIX."page_permissions SET perm_read = ".$perm_read.", perm_write = ".$perm_write." WHERE perm_page_id = ".$cur_revision[1]." AND perm_group_id = ".$group['id']); echo "UPDATE ".MYSQL_TABLE_PREFIX."page_permissions SET perm_read = ".$perm_read.", perm_write = ".$perm_write." WHERE perm_page_id = ".$cur_revision[1]." AND perm_group_id = ".$group['id']. ": ".mysql_affected_rows()."<br />"; if(!mysql_affected_rows()) $mysql->query("INSERT INTO ".MYSQL_TABLE_PREFIX."page_permissions (perm_page_id, perm_group_id, perm_group_name, perm_read, perm_write) VALUES (".$cur_revision[1].", ".$group['id'].", '".$group_name."', ".$perm_read.", ".$perm_write.")");
Das Echo in der Mitte gibt folgendes aus:
Code:
UPDATE page_permissions SET perm_read = 1, perm_write = 1 WHERE perm_page_id = 46 AND perm_group_id = 1: 0
Hat jemand ne Idee?
Kommentar