[development] db_rewrite_sql question

Dave Cohen drupal at dave-cohen.com
Tue Aug 15 23:13:34 UTC 2006


I was hoping it would not come to that.  But it looks like the only solution 
that does not require changes in other people's modules.  Thanks,


On Tuesday 15 August 2006 15:33, Nedjo Rogers wrote:
> > 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')) {
> }

More information about the development mailing list