I would like a tiny bit help re-writing db_query to use bind variables
Posted by crosenblum on June 17, 2008 at 4:56pm
Basically I can remember from my oracle days, of the power of bind variables.
As drupal has a lot of queries, that are repeating, with just a change in variables.
For example cache_get function which has a query like:
SELECT SQL_CACHE data, created, headers, expire, serialized FROM drupal_cache_menu WHERE cid = 'links:navigation:page-cid:node:1'
Well i have already added the SQL_CACHE statement, but in addition, i want to replace db_query, so for certain repeated queries, we can use bind variales.
Read more