/* * Using RowManager to update a row in the table */ echo '<br><br>Updating Row in Table<br>'; // Updating An entry in the Table: // get the ID of the entry we just created $viewerID = $viewer->getID(); // create a new ViewerManager with the viewerID as the primarykey of the row we // want to work with. $newViewer = new RowManager_ViewerManager($viewerID); echo 'languageID before update = ' . $newViewer->getLanguageID() . '<br>'; $newViewer->setLanguageID(1); $newViewer->updateDBTable(); // now reload the object to get the value from the DB $updatedViewer = new RowManager_ViewerManager($viewerID); echo 'languageID after update = ' . $updatedViewer->getLanguageID() . '<br>'; /* * Using a List iterator to step through a selection of rows */ // now lookup the MC region Access Group // first create a list iterator based on that table $groupManager = new RowManager_AccountGroupManager(); $accountGroups = $groupManager->getListIterator(); $accountGroups->setFirst(); $groupID = -1; while ($group = $accountGroups->getNext()) { if ($group->getLabel() == "MC") { echo '---> Found MC account group!<br>'; $groupID = $group->getID(); } }