26 #require_once 'Zend/Db/Statement.php'; 69 #require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; 73 $this->_originalSQL = $sql;
104 sqlsrv_free_stmt($this->_stmt);
105 $this->_stmt =
false;
117 if ($this->_stmt && $this->_executed) {
118 return sqlsrv_num_fields($this->_stmt);
137 $error = sqlsrv_errors();
142 return $error[0][
'code'];
158 $error = sqlsrv_errors();
165 $error[0][
'message'],
196 $params_[] = &$temp[
$i];
205 #require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; 209 $this->_executed =
true;
211 return (!$this->_stmt);
223 public function fetch($style =
null, $cursor =
null, $offset =
null)
229 if (
null === $style) {
233 $values = sqlsrv_fetch_array($this->_stmt, SQLSRV_FETCH_ASSOC);
235 if (!
$values && (
null !== $error = sqlsrv_errors())) {
236 #require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; 246 $this->_keys[] = $this->_adapter->foldCase($key);
261 $assoc = array_combine($this->_keys,
$values);
265 $row = (object) array_combine($this->_keys,
$values);
268 $assoc = array_combine($this->_keys,
$values);
273 #require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; 294 if (!sqlsrv_fetch($this->_stmt)) {
295 if (
null !== $error = sqlsrv_errors()) {
296 #require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; 304 $data = sqlsrv_get_field($this->_stmt, $col);
305 if (
$data ===
false) {
306 #require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; 327 $obj = sqlsrv_fetch_object($this->_stmt);
329 if ($error = sqlsrv_errors()) {
330 #require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; 352 $fields = sqlsrv_field_metadata($this->_stmt);
358 if (!isset(
$fields[$column])) {
375 if (sqlsrv_next_result($this->_stmt) ===
false) {
376 #require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; 400 if (!$this->_executed) {
404 $num_rows = sqlsrv_rows_affected($this->_stmt);
407 if ($num_rows ===
false) {
408 #require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; 426 public function fetchAll($style =
null, $col =
null)
428 $data = parent::fetchAll($style, $col);
430 $remove = $this->_adapter->foldCase(
'ZEND_DB_ROWNUM');
433 if (is_array(
$row) && array_key_exists($remove,
$row)) {
434 unset(
$row[$remove]);
fetch($style=null, $cursor=null, $offset=null)
_bindParam($parameter, &$variable, $type=null, $length=null, $options=null)
fetchAll($style=null, $col=null)
$_option $_optionId $class
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
_execute(array $params=null)
fetchObject($class='stdClass', array $config=array())