You are here

function shoutbox_user_db_rewrite_sql in Shoutbox 6.2

Implementation of hook_db_rewrite_sql()

File

shoutbox_user/shoutbox_user.module, line 108

Code

function shoutbox_user_db_rewrite_sql($query, $table, $primary, $contexts) {
  if ($table == 'shoutbox' && isset($contexts['shoutbox_user'])) {
    $query_mods['join'] = "INNER JOIN {shoutbox_user} shoutbox_user ON shoutbox.shout_id = shoutbox_user.shout_id\r\n";
    $query_mods['where'] = "shoutbox_user.uid = " . (int) $contexts['shoutbox_user'];
    return $query_mods;
  }
}