示例#1
0
 /**
  * Test loadRow method
  *
  * @return  void
  *
  * @since   11.4
  */
 public function testLoadRow()
 {
     $query = $this->object->getQuery(true);
     $query->select('*');
     $query->from('jos_dbtest');
     $query->where('description=' . $this->object->quote('three'));
     $this->object->setQuery($query);
     $result = $this->object->loadRow();
     $expected = array(3, 'Testing3', '1980-04-18 00:00:00', 'three');
     $this->assertThat($result, $this->equalTo($expected), __LINE__);
 }
示例#2
0
 /**
  * Load the first row of the query.
  *
  * @throws SPException
  * @return array
  */
 public function loadRow()
 {
     try {
         $r = $this->db->loadRow();
         $this->count++;
     } catch (Exception $e) {
     }
     if ($this->db->getErrorNum()) {
         throw new SPException($this->db->stderr());
     } else {
         return $r;
     }
 }