Subversion Repositories php_library

Rev

Rev 51 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 51 Rev 52
Line 94... Line 94...
94
      items to have a parent.
94
      items to have a parent.
95
   */
95
   */
96
   private function loadData ( ) {
96
   private function loadData ( ) {
97
      $this->query = "select * from $this->tableName";
97
      $this->query = "select * from $this->tableName";
98
      if ( ! is_null( $this->recordList ) )
98
      if ( ! is_null( $this->recordList ) )
99
         $this->query .= " where $this->keyField not in (" . implode( ',',$this->recordList ) . ')';
99
         $this->query .= " where $this->keyField in (" . implode( ',',$this->recordList ) . ')';
100
      $inputRows = queryDatabaseExtended( $this->query ); // get everything from the table
100
      $inputRows = queryDatabaseExtended( $this->query ); // get everything from the table
101
      $inputRows = $inputRows['data']; // we only care about the data
101
      $inputRows = $inputRows['data']; // we only care about the data
102
      $this->inputRecords = array(); // initialize inputRecords to empty
102
      $this->inputRecords = array(); // initialize inputRecords to empty
103
      // main loop, will read the query results in one row at a time
103
      // main loop, will read the query results in one row at a time
104
      foreach ( $inputRows as $thisRow ) {
104
      foreach ( $inputRows as $thisRow ) {