Hello I'd like to display the column names as headers in an HTML table.
1. I need to retrieve the column names, but the following doesn't work: # cat cols.php <?php $dbh = new PDO("sqlite:db.sqlite"); $sql = ".header ON"; $dbh->exec($sql); $sql = "SELECT * FROM customer"; $row = $dbh->query($sql)->fetch(); foreach ($row as $col) { print $col . "<P>\n"; } $sql = ".header OFF"; $dbh->exec($sql); $dbh = null; ?> 2. Additionally, if possible, I'd like to display a user-friendly name instead of the names I use internally. Does someone have some code handy? Thank you. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users