protected function executePreparedStatement($query, $params)
        {
            $res = odbc_prepare($this->_lnk, $query);
            if(!$res) {
                $error = odbc_errormsg($this->_lnk);
                $this->log('Prepare failed: ' . $error);
                throw new Exception('Preparing query failed ' . $error, self::PREPARE_FAILED);
            }
            $res = odbc_execute($res, $params);
            if(!$res) {
                $error = odbc_errormsg($this->_lnk);
                $this->log('Prepared query execution failed: ' . $error);
                throw new Exception('Executing prepared query failed ' . $error, self::QUERY_FAILED);
            }
            return $res;
        }
protected function executePreparedStatement($query, $params)
        {
            $res = odbc_prepare($this->_lnk, $query);
            if(!$res) {
                $error = odbc_errormsg($this->_lnk);
                $this->log('Prepare failed: ' . $error);
                throw new Exception('Preparing query failed ' . $error, self::PREPARE_FAILED);
            }
            $res = odbc_execute($res, $params);
            if(!$res) {
                $error = odbc_errormsg($this->_lnk);
                $this->log('Prepared query execution failed: ' . $error);
                throw new Exception('Executing prepared query failed ' . $error, self::QUERY_FAILED);
            }
            return $res;
        }
protected function executePreparedStatement ( $ query , $ params ) { $ res = odbc_prepare ( $ this -> _lnk , $ query ) ; if ( ! $ res ) { $ error = odbc_errormsg ( $ this -> _lnk ) ; $ this -> log ( 'Prepare failed: ' . $ error ) ; throw new Exception ( 'Preparing query failed ' . $ error , self :: PREPARE_FAILED ) ; } $ res = odbc_execute ( $ res , $ params ) ; if ( ! $ res ) { $ error = odbc_errormsg ( $ this -> _lnk ) ; $ this -> log ( 'Prepared query execution failed: ' . $ error ) ; throw new Exception ( 'Executing prepared query failed ' . $ error , self :: QUERY_FAILED ) ; } return $ res ; }
Prepare a query, execute it and return an ODBC result identifier
@param string $query
@param array $params
@return bool|resource
@throws Exception
Prepare a query execute it and return an ODBC result identifier