$hook_query_fields .= ", mytable.foobar1, mytable.foobar2"; $hook_query_joins .= " JOIN " . TABLE_PREFIX . "mytable ON (mytable.userid=user.userid)";