$_COLONSZ) return $p[1]; $_COLONARR[] = $v; return '?'; } /** * smart remapping of :0, :1 bind vars to ? ? * @param string $sql SQL statement * @param array $arr parameters * @return array */ function _colonscope($sql,$arr) { global $_COLONARR,$_COLONSZ; $_COLONARR = array(); $_COLONSZ = sizeof($arr); $sql2 = preg_replace_callback('/(:[0-9]+)/', '_colontrack', $sql); if (empty($_COLONARR)) return array($sql,$arr); foreach($_COLONARR as $k => $v) { $arr2[] = $arr[$v]; } return array($sql2,$arr2); } class ADODB_db2oci extends ADODB_db2 { var $databaseType = "db2oci"; var $sysTimeStamp = 'sysdate'; var $sysDate = 'trunc(sysdate)'; function _Execute($sql, $inputarr = false) { if ($inputarr) list($sql,$inputarr) = _colonscope($sql, $inputarr); return parent::_Execute($sql, $inputarr); } }; class ADORecordSet_db2oci extends ADORecordSet_odbc { var $databaseType = "db2oci"; function __construct($id,$mode=false) { return parent::__construct($id,$mode); } } } //define