$modx->db->update has a small error, found out the hard way messing with the example for to much time and asking Jared for wisdom and he saw the flaw. here is the error:
$table = $modx->getFullTableName("site_content");
$fields = array(
"pagetitle" => "New Title",
"alias" => "new-alias",
"menuindex" => 2,
"published" => 1
)
$rows_affected = $modx->db->update($fields, $table, "id = 45");
and the good version:
$table = $modx->getFullTableName("site_content");
$fields = array(
"pagetitle" => "New Title",
"alias" => "new-alias",
"menuindex" => 2,
"published" => 1
);
$rows_affected = $modx->db->update($fields, $table, "id = 45");
Maybe it could be fixed for other people.
Dimmy