View Single Post
Old 05-01-2009, 06:51 PM  
Jakez
Confirmed User
 
Jakez's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
Quote:
Originally Posted by Killswitch View Post
Oh, I thought you ment grouping them together like Leenks does, or Evilhumor.com

Anybody have any idea on how they go about that?
Here's how I did it basically, removed all the html to make it look more simple but it should still print out fine:

Quote:
<?php
$result=mysql_query("SELECT *, from_unixtime(time,'%Y-%m-%d') as date FROM songs GROUP BY time ORDER BY date DESC, views DESC");
while($row=mysql_fetch_array($result))
{
if(!$date)
{
$date=date("l F j",$row[time]);
?>
<b><?=$date?></b><br>
<?=$row[artists]?> - <?=$row[title]?><br>
<?php
}
elseif(date("l F j",$row[time])==$date)
{
?>
<?=$row[artists]?> - <?=$row[title]?><br>
<?php
}
elseif(date("l F j",$row[time])!=$date)
{
$date=date("l F j",$row[time]);
?>
<b><?=$date?></b><br>
<?=$row[artists]?> - <?=$row[title]?><br>
<?php
}
}
?>
__________________
[email protected] - jakezdumb - 573689400

Killuminati
Jakez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote