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 --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/u8TY5A/tzNLAA/yQLSAA/CefplB/TM --------------------------------------------------------------------~-> The php_mysql group is dedicated to learn more about the PHP/MySQL web database possibilities through group learning. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php_mysql/ <*> 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/
