Hey all!

I have a slight problem I was hoping you could help me with. I wrote earlier but no 
response (so one last try). I'm writing a little news script for my site, and well 
here is the scenario:


I have news,headline,author,date,time,etc. all in a table in a mysql db, that I use 
mysql_fetch_array to pull out of the db and display on a page. It shows everything 
fine, but I was wondering, if there is more than one news entry per day, how can I 
display 1 date above the news entries for that day. (Instead of a seperate date for 
each news entry).


I have 2 tables in a mysql database, one holds author information (name, email, 
password, etc.)
The other table holds the news that they submit (news, date, time, headline, etc.)

Now I am trying to display the news on a page, ordered of course by date (or id in 
this case) and well i'm using the code below.


$db = mysql_pconnect("localhost");

$result1 = mysql_query("SELECT * FROM news,authors ORDER BY `id` DESC",$db); 

echo "<table cellpadding=0 cellspacing=0><tr><td><img src=images/r13.gif></td><td 

width=100%><p><font size=2 face=verdana color=white><strong>" . $myrow["headline"] . 
<font size=1 face=verdana color=white><br>Posted by <A HREF=mailto:"; . $myrow["email"] 
. ">" . 

$myrow["author"] . "</A> at " . $myrow["time"] . $myrow["$tod"] . 

src=images/r15.gif></td></tr></table><br><FONT COLOR=white SIZE=2 FACE=verdana>" . 
$myrow["news"] . 


So the results would look something like:

Posted by $author at $time


and it would of course just repeat, for however many entries there is.

Now the problem:
If I enter 4 news posts a day, I want to show 1 date above all the news posts. 
(Instead of 1 date next to each news post) Any idea how I can do this (In easy to 
understand lingo/code please)?



Reply via email to