Hi

I have a relational db with a couple of tables holding things like
comments and complaints and actions.

In the "main" table, I have the contact details.

What I'd like to do is to query the db with a php app and to display the
entries in the result set with a "last action/comment/contact" done one
"max date".

ie.

main_table:

id      name    surname         date
1       john    doe             2003-07-07
2       jane    doe             2003-07-08

contact_table
main_id         date
1               2003-07-09
1               2003-07-12
2               2003-07-09

complaints_table
main_id         date
1               2003-07-10
2               2003-07-11

actions_table
main_id         action          date
1               action1         2003-07-13


Now, querying the db for all the entries in main, i'd like to return
something like:


Name    Surname         Last action/comment/complaint
John    Doe             action:action1  2003-07-13
Jane    Doe             complaint:      2003-07-11





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to