Lets tell people on the node/add form that that;

  1. In order to use a non default database connection, they can specify 'use [CONNECTION_NAME]' in their SQL
  2. When viewing a report, additional arguments are passed to the query. For example, node/12/csv/usa/shoes will pass 'usa' and 'shoes' as values to db_query(). Presumably, the query uses %s in order to show where these values should be used.

Comments

ltrain’s picture

When viewing a report, additional arguments are passed to the query. For example, node/12/csv/usa/shoes will pass 'usa' and 'shoes' as values to db_query(). Presumably, the query uses %s in order to show where these values should be used.

Does it already work this way? I need a way to pass variables to the query.