26 #require_once 'Zend/Db/Statement.php'; 68 #require_once 'Zend/Db/Statement/Db2/Exception.php'; 99 if (!db2_bind_param($this->_stmt, $parameter,
"variable",
$type, $datatype)) {
103 #require_once 'Zend/Db/Statement/Db2/Exception.php'; 123 db2_free_stmt($this->_stmt);
124 $this->_stmt =
false;
140 return db2_num_fields($this->_stmt);
155 $error = db2_stmt_error();
172 if ($error ===
false){
202 $retval = @db2_execute($this->_stmt,
$params);
204 $retval = @db2_execute($this->_stmt);
207 if ($retval ===
false) {
211 #require_once 'Zend/Db/Statement/Db2/Exception.php'; 217 $this->_keys = array();
219 for (
$i = 0;
$i < $field_num;
$i++) {
220 $name = db2_field_name($this->_stmt,
$i);
221 $this->_keys[] =
$name;
225 $this->_values = array();
227 $this->_values = array_fill(0, count($this->_keys),
null);
242 public function fetch($style =
null, $cursor =
null, $offset =
null)
248 if ($style ===
null) {
254 $row = db2_fetch_array($this->_stmt);
257 $row = db2_fetch_assoc($this->_stmt);
260 $row = db2_fetch_both($this->_stmt);
263 $row = db2_fetch_object($this->_stmt);
266 $row = db2_fetch_both($this->_stmt);
267 if (
$row !==
false) {
275 #require_once 'Zend/Db/Statement/Db2/Exception.php'; 309 #require_once 'Zend/Db/Statement/Db2/Exception.php'; 326 $num = @db2_num_rows($this->_stmt);
328 if ($num ===
false) {
346 public function fetchAll($style =
null, $col =
null)
348 $data = parent::fetchAll($style, $col);
350 $remove = $this->_adapter->foldCase(
'ZEND_DB_ROWNUM');
353 if (is_array(
$row) && array_key_exists($remove,
$row)) {
354 unset(
$row[$remove]);
fetchObject($class='stdClass', array $config=array())
$_option $_optionId $class
_execute(array $params=null)
_bindParam($parameter, &$variable, $type=null, $length=null, $options=null)
fetch($style=null, $cursor=null, $offset=null)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
fetchAll($style=null, $col=null)
if(!isset($_GET['name'])) $name