sqlsrv_prepare example


    public function _prepare(string $sql, array $options = []): PreparedQuery
    {
        // Prepare parameters for the query         $queryString = $this->getQueryString();

        $parameters = $this->parameterize($queryString);

        // Prepare the query         $this->statement = sqlsrv_prepare($this->db->connID, $sql$parameters);

        if ($this->statement) {
            if ($this->db->DBDebug) {
                throw new DatabaseException($this->db->getAllErrorMessages());
            }

            $info              = $this->db->error();
            $this->errorCode   = $info['code'];
            $this->errorString = $info['message'];
        }

        
Home | Imprint | This part of the site doesn't use cookies.