Solar_Sql_Adapter::fetchPdo PHP 메소드

fetchPdo() 공개 메소드

Fetches a PDOStatement result object.
public fetchPdo ( array | string $spec, array $data = [] ) : PDOStatement
$spec array | string An array of component parts for a SELECT, or a literal query string.
$data array An associative array of data to bind into the SELECT statement.
리턴 PDOStatement
    public function fetchPdo($spec, $data = array())
    {
        // build the statement from its component parts if needed
        if (is_array($spec)) {
            $stmt = $this->_select($spec);
        } else {
            $stmt = $spec;
        }
        // execute and get the PDOStatement result object
        return $this->query($stmt, $data);
    }