I have this script below which just calls on the database to display all in that table, ive recently added in some formatting/styling into the code and now im no longer getting any results and cant make out what i have done wrong!
Code: Select all
<style type="text/css">
.ay_client
{
border:2px solid #ccc;
background:#fff;
width:500px;
padding:10px;
text-align:center;
overflow:auto;
table-cell:2px solid #ccc;
}
td {
position: relative;
width: 14%;
margin: 0;
border-width: 1px 1px 1px 1px;
border-style: solid;
border-color: #000;
padding-top: 1em;
vertical-align: center;
}
tr.odd {
background-color:#ffffff;
}
tr.even {
background-color:#cccccc;
}
</style>
<div class="ay_client">
<?php
$query = mysql_query("SELECT * FROM jos_ay_client_activity");
{
echo $row['month'];
}
?><table><tr><td><b>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=datetime&dir=ASC">
<img src="images/M_images/sort0.png"></a>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=datetime&dir=DESC">
<img src="images/M_images/sort1.png"></a>
<br>Entered</b></td>
<td><b>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=month&dir=ASC">
<img src="images/M_images/sort0.png"></a>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=month&dir=DESC">
<img src="images/M_images/sort1.png"></a>
<br>Month</b></td>
<td><b>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=year&dir=ASC">
<img src="images/M_images/sort0.png"></a>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=year&dir=DESC">
<img src="images/M_images/sort1.png"></a>
<br>Year</b></td>
<td><b>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=client&dir=ASC">
<img src="images/M_images/sort0.png"></a>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=client&dir=DESC">
<img src="images/M_images/sort1.png"></a>
<br>Client</b></td>
<td><b>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=surveys&dir=ASC">
<img src="images/M_images/sort0.png"></a>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=surveys&dir=DESC">
<img src="images/M_images/sort1.png"></a>
<br>Surveys</b></td>
<td><b>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=airtests&dir=ASC">
<img src="images/M_images/sort0.png"></a>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=airtests&dir=DESC">
<img src="images/M_images/sort1.png"></a>
<br>Air Tests</b></td>
<td><b>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=project&dir=ASC">
<img src="images/M_images/sort0.png"></a>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=project&dir=DESC">
<img src="images/M_images/sort1.png"></a>
<br>Projects</b></td>
<td><b>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=bulks&dir=ASC">
<img src="images/M_images/sort0.png"></a>
<a href="index.php?option=com_jumi&fileid=4&Itemid=50?orderby=bulks&dir=DESC">
<img src="images/M_images/sort1.png"></a>
<br>Bulks</b></td></tr></table>
<?php
while($row = mysql_fetch_array($query))
echo '<table>';
for ($i = 0; $i < 10; $i++)
{
$class = $i%2 == 0? 'odd':'even';
echo "<tr class='" . $class . "' ><td>";
echo $row['datetime'];
echo "</td><td>";
echo $row['month'];
echo "</td><td>";
echo $row['year'];
echo "</td><td>";
echo $row['client'];
echo "</td><td>";
echo $row['surveys'];
echo "</td><td>";
echo $row['airtests'];
echo "</td><td>";
echo $row['project'];
echo "</td><td>";
echo $row['bulks'];
echo "</td></tr>";
}
echo "</table>";
?></div>Cheers