You are here

function shoutbox_group_db_rewrite_sql in Shoutbox 6.2

Implementation of hook_db_rewrite_sql()

File

shoutbox_group/shoutbox_group.module, line 165

Code

function shoutbox_group_db_rewrite_sql($query, $table, $primary, $contexts) {
  if ($table == 'shoutbox' && isset($contexts['shoutbox_group'])) {
    return array(
      'join' => "INNER JOIN {shoutbox_groups} shoutbox_groups ON shoutbox.shout_id = shoutbox_groups.shout_id\r\n",
      'where' => "shoutbox_groups.nid = " . (int) $contexts['shoutbox_group'],
    );
  }
}