Okay, I'm a newby and I've only been working on this for two days. I have:
$query = 'SELECT * FROM `meeting` '
. ' INNER JOIN `place` ON meeting.name = place.name '
. ' INNER JOIN `information` ON meeting.info_id = information.id '
. ' ORDER BY `plan`,`state`,`city` ';
$result=mysql_query($query);
echo "<table border='0'>
<tr>
<th>Date</th>
<th>Time</th>
<th>Place</th>
<th>Address</th>
<th>City</th>
<th>State</th>
<th>Zip</th>
<th>Information</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['date'] . "</td>";
echo "<td>" . $row['time'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['address1'] . ", " . $row['place_address2'] . "</td>";
echo "<td>" . $row['city'] . "</td>";
echo "<td>" . $row['state'] . "</td>";
echo "<td>" . $row['zip'] . "</td>";
echo "<td>" . $row['plan'] . "</td>";
echo "</tr>";
}
echo "</table>";
Of course this way the data is displayed in rows like a spreadsheet. What I for the output to look like would be
for the data to be grouped under header rows by city, state
underneith the header row would be:
[name]
[date] . " - " . [time] //date format Thursday, October 28, 2010 and time format 11:00 am
[address1] . " - " . [address2] // if address2 is null then just address1
As always your help is greatly appreciated.
$query = 'SELECT * FROM `meeting` '
. ' INNER JOIN `place` ON meeting.name = place.name '
. ' INNER JOIN `information` ON meeting.info_id = information.id '
. ' ORDER BY `plan`,`state`,`city` ';
$result=mysql_query($query);
echo "<table border='0'>
<tr>
<th>Date</th>
<th>Time</th>
<th>Place</th>
<th>Address</th>
<th>City</th>
<th>State</th>
<th>Zip</th>
<th>Information</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['date'] . "</td>";
echo "<td>" . $row['time'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['address1'] . ", " . $row['place_address2'] . "</td>";
echo "<td>" . $row['city'] . "</td>";
echo "<td>" . $row['state'] . "</td>";
echo "<td>" . $row['zip'] . "</td>";
echo "<td>" . $row['plan'] . "</td>";
echo "</tr>";
}
echo "</table>";
Of course this way the data is displayed in rows like a spreadsheet. What I for the output to look like would be
for the data to be grouped under header rows by city, state
underneith the header row would be:
[name]
[date] . " - " . [time] //date format Thursday, October 28, 2010 and time format 11:00 am
[address1] . " - " . [address2] // if address2 is null then just address1
As always your help is greatly appreciated.