Pop\Db\Adapter\Pdo::prepare PHP Метод

prepare() публичный Метод

Prepare a SQL query.
public prepare ( string $sql, array $attribs = null ) : Pdo
$sql string
$attribs array
Результат Pdo
    public function prepare($sql, $attribs = null)
    {
        if (strpos($sql, '?') !== false) {
            $this->placeholder = '?';
        } else {
            if (strpos($sql, ':') !== false) {
                $this->placeholder = ':';
            }
        }
        if (null !== $attribs && is_array($attribs)) {
            $this->statement = $this->connection->prepare($sql, $attribs);
        } else {
            $this->statement = $this->connection->prepare($sql);
        }
        return $this;
    }