| | |
| | | if (!$this->db_handle || $this->db_mode=='r') |
| | | return FALSE; |
| | | |
| | | return $this->db_handle->lastInsertID($sequence); |
| | | $id = $this->db_handle->lastInsertID($sequence); |
| | | |
| | | return $this->db_handle->isError($id) ? null : $id; |
| | | } |
| | | |
| | | |
| | |
| | | break; |
| | | |
| | | case 'mssql': |
| | | return "datediff(s, '1970-01-01 00:00:00', $field)"; |
| | | return "DATEDIFF(second, '19700101', $field) + DATEDIFF(second, GETDATE(), GETUTCDATE())"; |
| | | |
| | | default: |
| | | return "UNIX_TIMESTAMP($field)"; |
| | |
| | | { |
| | | $debug_output = $scope . '('.$db->db_index.'): '; |
| | | $debug_output .= $message . $db->getOption('log_line_break'); |
| | | write_log('sqllog', $debug_output); |
| | | write_log('sql', $debug_output); |
| | | } |
| | | } |
| | | |
| | | |