I was wonder if it would be possible to build a classified ads system with PHP and MySQL using this design:
1) One database contains a USER table with primary key is USER_ID
2) another database contains a table of ADS that are placed, where primary key is AD_ID, and foreign key that is the USER_ID from the USER table.
Then, can I say,
SELECT price, description, (etc.) FROM ADS WHERE ADS.USER_ID = USER.USER_ID;
I don't know if the above syntax is correct (probably not), I'm just guessing.
I wanted to keep that user database seperate from the ads database so that the user db can easily be used for other purposes besides classified ads... like a forum.
Is this a good design? Would this be the way to approach it? How would approach it?
Thanks for all of the help in advance,
Jason La
-- <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->
1) One database contains a USER table with primary key is USER_ID
2) another database contains a table of ADS that are placed, where primary key is AD_ID, and foreign key that is the USER_ID from the USER table.
Then, can I say,
SELECT price, description, (etc.) FROM ADS WHERE ADS.USER_ID = USER.USER_ID;
I don't know if the above syntax is correct (probably not), I'm just guessing.
I wanted to keep that user database seperate from the ads database so that the user db can easily be used for other purposes besides classified ads... like a forum.
Is this a good design? Would this be the way to approach it? How would approach it?
Thanks for all of the help in advance,
Jason La
-- <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->