Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <!-- table border=1> --><br>
- <tr><th>transaction_ID</th>
- <th>account ID</th>
- <th>Transaction Type ID</th>
- <th>Amount</th>
- <th>Date</th><br>
- <th>account ID</th>
- <th>user ID</th>
- <th>name</th><br>
- <th>balance</th>
- <th>transaction_type_ID</th>
- <th>name</th><br>
- <th>user ID</th>
- <th>name</th><br>
- <?php
- $servername = "localhost";
- $username = "timn_admin";
- $password = "purdue91dan";
- $dbname = "timn_Dan-Os-Budget-DB";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "SELECT * FROM Transaction";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- // output data of each row
- while($row = $result->fetch_assoc()) {
- echo " " . $row["transaction_id"]. " " . $row["account_id"]. " " . $row["transaction_type_id"]. " " . $row["amount"]. " " . $row["create_date"].
- $sql = "SELECT * FROM Account";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- // output data of each row
- while($row = $result->fetch_assoc()) {
- echo " " . $row["account_id"]. " " . $row["user_id"]. " " . $row["name"]. " " . $row["balance"]. " " .
- $sql = "SELECT * FROM TransactionType";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- // output data of each row
- while($row = $result->fetch_assoc()) {
- echo " " . $row["transaction_type_id"]. $row["name"].
- $sql = "SELECT * FROM User";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- // output data of each row
- while($row = $result->fetch_assoc()) {
- echo " " . $row["user_id"]. " " . $row["name"]. " " .
- ;
- }
- } else {
- echo "0 results";
- }
- $conn->close();
- ?>
- <br><br>
- ;
- }
- } else {
- echo "0 results";
- }
- $conn->close();
- ?>
- <br><br>
- ;
- }
- } else {
- echo "0 results";
- }
- $conn->close();
- ?>
- <br><br>
- ;
- }
- } else {
- echo "0 results";
- }
- $conn->close();
- ?>
- <br><br>
- <th> Please overlook the underneath, it is just me experimenting... </th>
- <br> <br>
- <th>Borrower_id</th>
- <th>Borrower Name</th>
- <th>Borrower Surname</th></tr>
- </head>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Advanced Table CSS formatting</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta http-equiv="Author" content="Alexander Bell" />
- <meta http-equiv="Copyright" content="2011-2015 Infosoft International Inc" />
- <meta http-equiv="Expires" content="0" />
- <meta http-equiv="Cache-control" content="no-cache" />
- <meta name="Robots" content="all" />
- <meta name="Distribution" content="global" />
- <style type="text/css">
- #divContainer {
- max-width: 600pt;
- width: 90%;
- margin: 0 auto;
- margin-top: 10pt;
- font-family: Georgia;
- padding: 0.5em 1em 1em 1em;
- /* rounded corners */
- -moz-border-radius: 10px;
- -webkit-border-radius: 10px;
- border-radius: 10px;
- /* add gradient */
- background-color: #ababab;
- background: -webkit-gradient(linear, left top, left bottom, from(#909090), to(#ababab));
- background: -moz-linear-gradient(top, #909090, #a0a0a0);
- /* add box shadows */
- -moz-box-shadow: 5px 5px 10px rgba(0,0,0,0.3);
- -webkit-box-shadow: 5px 5px 10px rgba(0,0,0,0.3);
- box-shadow: 5px 5px 10px rgba(0,0,0,0.3);
- }
- #divContainer h2 { color: #efefef; font-size: 1em; }
- table.formatHTML5 {
- width: 100%;
- border-collapse: collapse;
- text-align: left;
- color: #014421;
- }
- table.formatHTML5 td {
- vertical-align: middle;
- padding: 0.5em;
- }
- table.formatHTML5 thead tr td {
- background-color: White;
- vertical-align: middle;
- padding: 0.6em;
- font-size: 0.8em;
- }
- table.formatHTML5 thead tr th,
- table.formatHTML5 tbody tr.separator {
- padding: 0.5em;
- background-color: #909090;
- background: -webkit-gradient(linear, left top, left bottom, from(#909090), to(#ababab));
- background: -moz-linear-gradient(top, #909090, #ababab);
- color: #efefef;
- }
- table.formatHTML5 tbody tr:nth-child(odd) {
- background-color: #fafafa;
- }
- table.formatHTML5 tbody tr:nth-child(even) {
- background-color: #efefef;
- }
- table.formatHTML5 tbody tr:last-child {
- border-bottom: solid 1px #404040;
- }
- table.formatHTML5 tbody tr:hover {
- cursor: pointer;
- background-color: #909090;
- background: -webkit-gradient(linear, left top, left bottom, from(#909090), to(#ababab));
- background: -moz-linear-gradient(top, #909090, #ababab);
- color: #dadada;
- }
- table.formatHTML5 tfoot {
- text-align: center;
- color: #303030;
- text-shadow: 0 1px 1px rgba(255,255,255,0.3);
- }
- </style>
- </head>
- <body>
- <!-- HERE HERE HERE HERE -->
- <!-- CENTERED-->
- <div id="divContainer">
- <h2>ANNUALIZED INFLATION RATE ON SELECTED PRODUCTS |NYC 2000-2010</h2>
- <!-- HTML5 TABLE FORMATTED VIA CSS3-->
- <table class="formatHTML5">
- <!-- TABLE HEADER-->
- <thead>
- <tr><td colspan="4">DISCLAIMER:
- ALL DATA PROVIDED 'AS IS' FOR DEMO PURPOSE ONLY</td></tr>
- <tr>
- <th>transaction_ID</th>
- <th> account ID </th>
- <th>Transaction Type ID</th>
- <th>Amount</th>
- <th>dAte</th>
- </tr>
- </thead>
- <!-- TABLE BODY: MAIN CONTENT-->
- <tbody>
- <tr>
- <td>Coke® Inflation Index</td>
- <td>7.23%</td>
- <td>Yeah, it's about $2/bottle now</td>
- <td>CheeseBurger Bobby's</td>
- </tr>
- <tr>
- <td>Gas Inflation Index</td>
- <td>6.94%</td>
- <td><a href="http://infosoft.biz/Inflation.aspx"
- target="_blank"
- title="Yeah, pain at the pump!">Inflation Calculator</a></td>
- </tr>
- <tr>
- <td>NY subway fare Inflation Index</td>
- <td>4.14%</td>
- <td><a href="http://infosoft.biz/bus.aspx"
- target="_blank"
- title="Take a virtual Bus ride">NYC Realtime Bus Map</a></td>
- </tr>
- <tr>
- <td>Oil (WTI) Inflation Index estimated</td>
- <td>13.59%</td>
- <td>Wow!</td>
- </tr>
- <tr>
- <td>Post Stamp Inflation Index</td>
- <td>2.92%</td>
- <td><a href="http://infosoft.biz/geocoder.aspx"
- target="_blank" title="You can see Paris
- from here">Online Geocoder</a></td>
- </tr>
- <tr>
- <td>PC RAM (memory) Inflation Index</td>
- <td>-28.34%</td>
- <td><a href="http://infosoft.biz/download.aspx"
- target="_blank" title="Rejoyce 'Intel
- Inside'!">Rejoyce, "Intel Insides"!</a></td>
- </tr>
- <!--SEPARATOR ROW USED DIFFERENT STYLE-->
- <tr class="separator">
- <td colspan="3">Precious metals Price Index: shown for comparison</td>
- </tr>
- <tr>
- <td>Silver</td>
- <td>20.94%</td>
- <td><a href=
- "http://www.codeproject.com/Tips/262546/HTML-Tables-formating-best-practices"
- target="_blank" title="Read the article on Codeproject.com">
- Read the article</a></td>
- </tr>
- <tr>
- <td>Gold</td>
- <td>17.86%</td>
- <td>AU is Golden!</td>
- </tr>
- <tr>
- <td>Platinum</td>
- <td>10.98%</td>
- <td></td>
- </tr>
- <tr>
- <td>Palladium</td>
- <td>-1.86% </td>
- <td>Element Pd</td>
- </tr>
- </tbody>
- <!-- TABLE FOOTER-->
- <tfoot>
- <tr><td colspan="3">Copyright
- Ⓒ 2011-2015 Infosoft International Inc</td></tr>
- </tfoot>
- </table>
- </div>
- </body>
- </html>
- <body>
- </html>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement