RedBeanPHP\Adapter\DBAdapter::getRow PHP Method

getRow() public method

See also: Adapter::getRow
public getRow ( $sql, $bindings = [] )
    public function getRow($sql, $bindings = array())
    {
        $this->sql = $sql;
        $this->signal('sql_exec', $this);
        return $this->db->GetRow($sql, $bindings);
    }

Usage Example

Example #1
0
 /**
  * Returns the indexes for type $type.
  *
  * @param string $type
  *
  * @return array $indexInfo index information
  */
 protected function getIndexes($type)
 {
     $table = $this->esc($type, TRUE);
     $indexes = $this->adapter->get("PRAGMA index_list('{$table}')");
     $indexInfoList = array();
     foreach ($indexes as $i) {
         $indexInfoList[$i['name']] = $this->adapter->getRow("PRAGMA index_info('{$i['name']}') ");
         $indexInfoList[$i['name']]['unique'] = $i['unique'];
     }
     return $indexInfoList;
 }
All Usage Examples Of RedBeanPHP\Adapter\DBAdapter::getRow