Hi there everyone
I have a database with 15 tables in my database format
address ccn expirydate securitycode amount
I would like to display a table that will name all 15 tables and the sum of amount
so eg
table 1 456
table 2 465
table 3 987
.
.
table 15 432
I think it might be like SELECT * TABLES, SUM(amount); ORDER TABLES
any ideas ?
How would i use php to display it like that
I have this already and it doesnt work
Code:<?PHP mysql_pconnect('localhost','admin','admin'); mysql_select_db("wml"); $results = mysql_query("SELECT * TABLES, SUM(amount); ORDER TABLES"); if ($results){ while ($a = mysql_fetch_array($results)) { echo'<TABLE><TR> <TD>'.$a['name'].'</TD> <TD>'.$a['amount'].'</TD> </TR></TABLE>'; }; print("</TABLE>"); } else { print("No results to display"); }; ?>
any ideas ? thanks guys