Dibi\Connection::fetchSingle PHP Method

fetchSingle() public method

Executes SQL query and fetch first column - shortcut for query() & fetchSingle().
public fetchSingle ( $args ) : string
return string
    public function fetchSingle($args)
    {
        $args = func_get_args();
        return $this->query($args)->fetchSingle();
    }

Usage Example

コード例 #1
0
ファイル: GeneralTree.php プロジェクト: nikolaslada/sakura
 /**
  * It returns number of all rows in table.
  * @return int
  */
 public function selectNumOfAllRows()
 {
     return $this->connection->fetchSingle("SELECT COUNT(*) FROM `" . $this->table->getName() . "`");
 }