I have inherited a drupal 6 site with some custom modules, all of which are making use of db_query() commands.
Now I'm porting the site with all it's modules to drupal 7, and consequently have to adjust most of the database queries to work with the new DBTNG abstraction layer.
That's fine, but a very tedious task. Is there any automated way to do this, or a module to at least help you on the way?
E.g.: is there some way to turn this
$query = "SELECT * FROM mytable WHERE id=1"; $result = db_query($query);
$result = db_select('mytable','t') ->fields('t') ->condition('id',1) ->execute() ->fetchAll();
Thanks a lot in advance!