what you want is put your script in your root
scriptwithresultsfromyourdatabase.php
add a widget, set type "Php direct execution",
then
Code:
ob_start();
include("/path_to_your_root/scriptwithresultsfromyourdatabase.php");
$output .= ob_get_contents();
ob_end_clean();
and fill in a custom template name,
then make the template,
and put
HTML Code:
{vb:raw output}
where you want to show the results of your script