you can review this example and adjust to your enviroment.
<?php
include('adodb.inc.php');
include('tohtml.inc.php');
$conn = &ADONewConnection('mysql');
$conn->PConnect('host','user','pass','database');
$rs = $conn->Execute('select from phplens');
rs2html($rs); / recordset to html table */
?>
You need to download the adodb library from www.php.net
I hope that this example helps you!