One approach: Write a custom tag (say, <mydatabase>) that hits your
database using the API at
http://us.php.net/mysql and returns results.
For example, <mydatabase>select foo, bar from blat</mydatabase> could
produce an HTML table of the results, with the column names (foo, bar)
as the table headings.
DanB