View Full Version : MYSQL - sharing table
Wilfred1
05-02-2010, 06:56 AM
I am thinking about the future of my site and the integration with an ecommerce shop so I know you can share a table between two databases on the same server but can someone tell me if you can share a table across two different hosts?
Paul M
05-02-2010, 11:14 AM
How would you share a table across two databases ?
Wilfred1
05-02-2010, 08:55 PM
I would be looking at sharing the vBulletin user table with CS-Cart which is an ecom application.
But as an example between vBulletin db1 and db2 you would:
1. rename the user table in db2 to user_old
2. create a view of the user table from db1 in db2 by running script in db2:
CREATE VIEW user as SELECT * FROM db1.user;
In the case of CS-Cart you would need to do some other work with the queries to match but your question was "How would you share a table across two databases ?"
ImmortalForums
05-02-2010, 11:35 PM
why not just have CS-Cart read the vbulletin database for its usernames?
Marco van Herwaarden
05-05-2010, 09:32 AM
Even if you would create views, then each of these user tables should share the same information, using the same datatypes etc.. And i doubt that is the case.
Wilfred1
05-06-2010, 02:18 AM
Thanks Guys
CS-Cart has quoted me $400 to create an integration module so I thought about the MYSQL Views method and whilst I knew it worked across domains (at the same host) I wasn't sure if it worked across hosts in some way as well
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.