ok, first of all i'm really sorry for double posts... and the other thing is that i think i wasn't clear enough... i don't know how to explain my problem but i will give my best...
so...
i don't need to sort stuff because that's already sorted but nevermind that now. instead i need to select all records with same 'month' value and display them in one table. then i need to select all records with SECOND 'month' value and display them in OTHER table.
leatherback posted this:
$query="Select * from TABLE order by month, day, hour";
$result = mysql_query($query);
$ThisMonth = "";
while($row=mysql_fetch_array($result))
{
if($ThisMonth != $row[month])
{
$ThisMonth = $row[month];
echo "<b>".$ThisMonth.":</b><br>"
}
echo $row[day]."<br>";
}
but output of that looks like:
[B]january:[/B]
monday @ 20h
some text...
[B]january:[/B]
tuesday @ 22h
some text...
[B]january:[/B]
thursday @ 21h
some text...
[B]january:[/B]
sunday @ 19h
some text...
[B]february:[/B]
monday @ 20h
some text...
[B]february:[/B]
tuesday @ 22h
some text...
etc etc etc
BUT, that's not what i want! instead of this output i need to display month name ONLY ONCE (just like shown above in my first post).
so, generally i know what i need i just dont know how to ask for it... it would be something like:
for every record in table that have same month name display table with header which contains that month name and cell with all other records in that month
so, call me stupid but my brain is not functioning anymore because i was on work all day and i have a headache but i have to do this so i could get pay...
thanks in advance! very much!
and, yes, sorry for double posts one more time! it won't happen again 🙂