RE: [PHP] MySQL query/PHP logic?

2003-07-29 Thread Jennifer Goodie
select * from main left join fof on main.id = fof.id left join pub on main.id = pub.id left join gov on main.id = gov.id left join med on main.id = med.id left join ngo on main.id = ngo.id left join own on

Re: [PHP] MySQL query/PHP logic?

2003-07-29 Thread Nicholas Robinson
Don't know whether it's just because it's late at night here in the UK or whether I'm being a bit dim, but wouldn't it be much, much easier to store all the data in your non-main tables in a single table and distinguish the type of data (i.e. fof, pub, gov, etc) by a field. This would

Re: [PHP] MySQL query/PHP logic?

2003-07-29 Thread Jim Lucas
Try something like this. select fof.id AS fof_id, fof.information_sent AS fof_info, pub.id AS pub_id, pub.information_sent AS pub_info, gov.id AS gov_id, gov.information_sent AS gov_info, med.id AS med_id, med.information_sent AS med_info, ngo.id AS ngo_id, ngo.information_sent AS