Execute an arbitrary SQL command in Drupal 5

Snippet

If execute PHP is enabled (in a block), the SQL to execute an arbitrary SQL command.

$res = db_query('show tables');
while ($row = db_fetch_array($res)) { print_r($row); }

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.