Closed (works as designed)
Project:
Drupal core
Version:
4.7.0-rc2
Component:
other
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2006 at 22:13 UTC
Updated:
8 Apr 2006 at 06:02 UTC
Should look something like this:
function watchdog($type, $message, $severity = WATCHDOG_NOTICE, $link = NULL){
global $user;
$wid = db_next_id("watchdog");
db_query("INSERT INTO {watchdog} (wid, uid, type, message, severity, link, loc
ation, referer, hostname, timestamp) VALUES (%d, %d, '%s', '%s', %d, '%s', '%s',
'%s', '%s', %d)", $wid, $user->uid, $type, $message, $severity, $link, request_
uri(), referer_uri(), $_SERVER['REMOTE_ADDR'], time());
}
Comments
Comment #1
hunmonk commentedthis is by design for performance reasons.
Comment #2
howertko commentedMakes it difficult to port this code to other databases that don't support auto incrementing columns (ie Ingres).