Hi, What I'm trying to achieve I would have thought would have been very simple, but I must be stupid, LOL!
I have two tables - blogs (for blog entries) and comments (for comments on the blog entries). The blogger writes an entry and visitors leave comments for a particlular blog entry. The comment entry form will appear under each blog entry, and after the associated comments if there are any. I want to display on the web page all the blog entries for a particular day followed directly underneath each blog entry by any comments, or none at all if no comments have been made. I have a number of fields in each table: ===== blogs ===== bID (primary key) timeAdded title entry ======== comments ======== cID (primary key) bID (foreign key) timeAdded name comment As I understand it, this is a one to many relationship (one blog entry to many comments). What I can't get my head round is how to write the mysql query so that a particular blog entry is displayed with its associated comments displayed directly underneath, followed by the next blog entry and associated comments. As an aside (I think I can work out how to do it) the blog entries for a particular day will be listed last entry first and the associated comments listed first comment first. TIA for any help. Richard ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/HKFolB/TM --------------------------------------------------------------------~-> Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
