> What's a module to do when it recieves two calls to hook_db_rewrite_sql; > in > both cases $primary_field is 'cid' and $primary_table is 'c', but in one > case > the query needs re-writing and in the other it does not? You could, awkwardly, test the full $query for your table's name and alias, e.g. if (strstr($query, '{category} c')) { }