| | |
| | | else { |
| | | $params = (array)$params; |
| | | $q = $this->db_handle->prepare($query, null, $mode=='w' ? MDB2_PREPARE_MANIP : null); |
| | | if ($this->db_handle->isError($q)) { |
| | | if (MDB2::isError($q)) { |
| | | $this->db_error = true; |
| | | $this->db_error_msg = $q->userinfo; |
| | | |
| | |
| | | |
| | | $id = $this->db_handle->lastInsertID($table); |
| | | |
| | | return $this->db_handle->isError($id) ? null : $id; |
| | | return MDB2::isError($id) ? null : $id; |
| | | } |
| | | |
| | | |
| | |
| | | case 'mssql': |
| | | case 'sqlsrv': |
| | | $delim = ' + '; |
| | | // Modify arguments, because + operator requires them to be of type varchar (#1488505) |
| | | // with SQL Server 2012 we can use just CONCAT(), but we need to support older versions |
| | | foreach ($args as $idx => $arg) { |
| | | $args[$idx] = "CAST($arg AS varchar)"; |
| | | } |
| | | break; |
| | | default: |
| | | $delim = ' || '; |