Ruckusing_Adapter_Sqlite3_Base::multi_query PHP Method

multi_query() public method

Execute several queries
public multi_query ( string $queries ) : boolean
$queries string queries to run
return boolean
    public function multi_query($queries)
    {
        $res = $this->sqlite3->exec($queries);
        if ($this->isError($res)) {
            throw new Ruckusing_Exception(sprintf("Error executing 'query' with:\n%s\n\nReason: %s\n\n", $queries, $this->lastErrorMsg()), Ruckusing_Exception::QUERY_ERROR);
        }
        return true;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Execute a query
  *
  * @param string $query the query or queries to run
  *
  * @return boolean
  */
 public function execute($query)
 {
     return $this->_adapter->multi_query($query);
 }