All pastes #769358 Raw Edit

macouno rocks!

public text v1 · immutable
·published 2007-11-11 11:27 UTC
rendered paste body
<?php
$gettables = daSQL("SHOW TABLES FROM dvdlisting");
while ($tmp = mysql_fetch_row($gettables)) {
 $tablesshow[] = $tmp;
}
//Now we should of got the tables, lets group the lend column
foreach($tablesshow as $value) {
//$lender = daSQL("SELECT COUNT(*) as LoanCOUNT FROM `".$value[0]."` WHERE onLOAN='1'  ");
$lender = daSQL("SELECT COUNT(DISTINCT onLoan) FROM `".$value[0]."` ");
}
while ($lend = mysql_fetch_assoc($lender)) {
    $lend[] = $temp;
}

echo "you have: ".$lend[0]." on loan Click Here to view them";
preprint($tablesshow);
?>