Search code examples
phpsqldrupaldeveloper-tools

Is there a tool that can transform a static SQL string into valid Drupal db query code?


I am wondering if there is some tool available, that will take as input a SQL command, and as output will return valid Drupal code that can be used in the Drupal Api?

EDIT

The idea is I have large, 25 lines of SQL commands ready to be used on the database. And they are somehow complicated, so I am wondering how could I rewrite them with a tool to use the object members on the db_query to do the same stuff as my large SQL command line.


Solution

  • i assume there's no such tools.
    Just read:
    sql coding conventions
    http://drupal.org/writing-secure-code