function _query($sql, $inputarr)
 {
     if (is_string($sql)) {
         $sql = str_replace('||', '+', $sql);
     }
     return ADODB_odbc::_query($sql, $inputarr);
 }
 function ServerInfo()
 {
     $info = ADODB_odbc::ServerInfo();
     if (!$info['version'] && preg_match('/([0-9.]+)/', $info['description'], $matches)) {
         $info['version'] = $matches[1];
     }
     return $info;
 }
 function __construct()
 {
     global $ADODB_EXTENSION;
     $ADODB_EXTENSION = false;
     parent::__construct();
 }
Example #4
0
 function __construct()
 {
     if (strncmp(PHP_OS, 'WIN', 3) === 0) {
         $this->curmode = SQL_CUR_USE_ODBC;
     }
     parent::__construct();
 }
 function _query($sql, $inputarr = false)
 {
     if (is_string($sql)) {
         $sql = str_replace('||', '+', $sql);
     }
     $getIdentity = false;
     if (!is_array($sql) && preg_match('/^\\s*insert/i', $sql)) {
         $getIdentity = true;
         $sql .= (preg_match('/;\\s*$/i', $sql) ? ' ' : '; ') . $this->identitySQL . ' as insertid';
     }
     if ($getIdentity) {
         $res = ADODB_odbc::_query($sql, $inputarr);
         $row = odbc_fetch_array($res);
         $this->lastInsID = isset($row['insertid']) ? (int) $row['insertid'] : false;
     } else {
         $this->lastInsID = false;
         return ADODB_odbc::_query($sql, $inputarr);
     }
 }
 function __construct()
 {
     parent::__construct();
 }