I have a custom module that makes use of db_rewrite_sql to slightly modify the SQL statement when retrieving data, unfortunately the advertisement module isn't affected by it and I have found by searching here that it does not use db_rewrite_sql. There was a thread (http://drupal.org/node/557918) about the node access module and it seems that because of caching and the fact it doesn't always use the node table, it won't be implemented.

My question is, is there any way to change the SQL statement for my module? e.g. add "INNER JOIN {mytable} m ON m.nid=a.aid ... WHERE m.lid=%d" I don't really want to hack the module, but if it was just a matter of changing one line, perhaps that would be okay? I just don't know what to change exactly, and I don't know if there is a better way...

Thanks for your help

Comments

alynner’s picture

anyone? any ideas?

alynner’s picture

Issue summary: View changes

just made a small change to my SQL statement, so it made better sense