Guest User

Untitled

a guest
Nov 27th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1.     private function ProcessRow($row, $parentID = -1) {
  2.         $dataOut = array();
  3.         foreach ($row->attributes() as $column => $value) {
  4.             $dataOut[$column] = $value;
  5.         }
  6.         $dataOut['ownerID'] = $this->ownerID; // The AssetManager class is constructed to contain the character/corporation ID.
  7.         if ($parentID != -1) $dataOut['parentItemID'] = $parentID;
  8.         $queryString = "INSERT INTO ".$this->dbTable." (".implode(",", array_keys($dataOut)).")
  9.                         VALUES (\"".implode("\",\"", array_values($dataOut))."\")";
  10.         $this->db->Query($queryString); // A simple DB class to encapsulate DB calls.
  11.        
  12.         if (count($row->children())) {
  13.             foreach ($row->rowset->row as $row) {
  14.                 $this->ProcessRow($row, $dataOut['itemID']);
  15.             }
  16.         }
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment