[development] auto_increment

Nicolas Tostin nicolast at logis.com.mx
Mon Dec 12 17:35:35 UTC 2005


> > Btw, due to the chaotic use of sequences table (sometime it's used,
> > sometimes not)
>
> When not?
>

I don't have an exact list, but I remember having found some examples, so I
understood that it was better handling them by DB trigger (for Oracle schema
I mean) than doing nothing .
Here's one  (function statistics_exit in statistics module)
if ((variable_get('statistics_enable_access_log', 0)) &&
(module_invoke('throttle', 'status') == 0)) {
    // Log this page access.
    db_query("INSERT INTO {accesslog} (title, path, url, hostname, uid, sid,
timer, timestamp) values('%s', '%s', '%s', '%s', %d, '%s', %d, %d)",
drupal_get_title(), $_GET['q'], referer_uri(), $_SERVER['REMOTE_ADDR'],
$user->uid, session_id(), timer_read('page'), time());
  }
and I'm pretty sure it's not the only case.

Also, I think that modules creators would rely on such function for their
modules.



More information about the development mailing list