Subversion Repositories phpLibraryV2

Rev

Rev 34 | Rev 36 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34 Rev 35
Line 314... Line 314...
314
       * Otherwise, function returns true
314
       * Otherwise, function returns true
315
       */
315
       */
316
      public function getOneRow( $sql = null ) {
316
      public function getOneRow( $sql = null ) {
317
         if ( isset( $sql ) )
317
         if ( isset( $sql ) )
318
            $this->parameters[ 'query' ] = $sql;
318
            $this->parameters[ 'query' ] = $sql;
319
         $save = $this->parameters[ 'useAssociativeArray' ];
319
         $save = $this->parameters[ 'returntype' ];
320
         $useAssociativeArray = true;
320
         $useAssociativeArray = true;
321
         $this->run();
321
         $this->run();
322
         $useAssociativeArray = $save;
322
         $useAssociativeArray = $save;
323
         if ( $this->parameters[ 'rowsAffected' ] == 1 ) {
323
         if ( $this->parameters[ 'rowsAffected' ] == 1 ) {
324
            $this->parameters[ 'returnData' ] = $this->parameters[ 'returnData' ][0];
324
            $this->parameters[ 'returnData' ] = $this->parameters[ 'returnData' ][0];
325
            return true;
325
            return $this->parameters[ 'returnData' ];
326
         } else
326
         } else
327
            $this->parameters['error'] = "$this->parameters[query] did not return a unique row in getOneRow";
327
            $this->parameters['error'] = "$this->parameters[query] did not return a unique row in getOneRow";
328
         return false;
328
         return false;
329
      } // getOneRow
329
      } // getOneRow
330
         
330