Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (17 sloc) 515 Bytes
require_once 'DB.php';
require_once 'Console/Table.php';
$dbh = DB::connect('mysqli://pear:pear@localhost/pear');
if (PEAR::isError($dbh)) {
die('Database connection failed');
$sql = '
SELECT, p.license
FROM packages p
WHERE p.package_type = "pear" AND p.license LIKE "%PHP%"
$data = $dbh->getAll($sql, DB_FETCHMODE_ASSOC);
$table = new Console_Table();
$table->setHeaders(array('Package (' . count($data) .')', 'License'));
echo $table->getTable();
Something went wrong with that request. Please try again.