I have very simple code:
$resultTest = mysql_query("SELECT * FROM inventarioStat WHERE `localizacion` = 'Sagasta' GROUP BY fecha")
or die(mysql_error());
$rowTest = mysql_fetch_array( $resultTest );
echo "<table border='1' padding='2' cellspacing='0' >";
{ foreach($rowTest['fecha'] as $key => $value) {
echo "<tr>";
echo "<td>" . $rowTest['fecha'][$key] ."</td>";
echo "<td>" . $rowTest['idItem'][$key] . "</td>";
echo "<td>";
echo $rowTest['nombreItem'][$key] ."</td></tr>";
mysql_query($query);
}
}
echo "</table>";
echo "<br>";
What Im trying to get is to display all the data next to each other group by date using the html table, something like this:
Fecha Fecha Fecha
idItem nombre cantidad idItem nombre cantidad idItem nombre cantidad etc...
My code doesnt seems to be working. Can you push me in the right direction? Thank you