Hi !
Here is my problem:
This is for a website for classified Ads. The Ads can be posted by registered users or the Ads can come from external partner sites.
Therefore, I have kept 2 user tables - one for registered users and one for non-registered users, and 1 table for Classified Ads. The Ads table holds Ads from both registered users and external sites, with a column which indicates the source of Ad, i.e. it has two values internal and external.
I want to display all Ads on a page. The user info is to be read from the 2 user tables depending on the source of the Ad. Most of the fields of the 2 user tables are same. However, since we ask registered users to provide more information, the table for registered users has more fields.
Now, how do I go about retrieving data from the 3 tables. Do I need to run two separate queries ? I am a beginner in SQL and look forward to your suggestions.
Thanks,
James
Here is my problem:
This is for a website for classified Ads. The Ads can be posted by registered users or the Ads can come from external partner sites.
Therefore, I have kept 2 user tables - one for registered users and one for non-registered users, and 1 table for Classified Ads. The Ads table holds Ads from both registered users and external sites, with a column which indicates the source of Ad, i.e. it has two values internal and external.
I want to display all Ads on a page. The user info is to be read from the 2 user tables depending on the source of the Ad. Most of the fields of the 2 user tables are same. However, since we ask registered users to provide more information, the table for registered users has more fields.
Now, how do I go about retrieving data from the 3 tables. Do I need to run two separate queries ? I am a beginner in SQL and look forward to your suggestions.
Thanks,
James
Comment