/ Published in: PHP
Great for generating quick reports from your drupal database in a PHP page.
Note that you will have to use the appropriate numfields and fetchfield functions for your database.
Expand |
Embed | Plain Text
<?php function show_query($sql){ $result = db_query($sql); while($row = db_fetch_array($result)){ $rows[] = $row; } $i = 0; $header[] = $meta->name; $i++; } } show_query("SELECT name, mail FROM {users} LIMIT 10"); ?>
You need to login to post a comment.
