Thanks to those that have helped thus far. To clarify what we need: Our CRM system (really a prospect gathering system) needs to internally hosted, be realtime and needs to be updated automatically. Our website (hosted externally) is *one of many* tools which we are going to use to gather information from prospects via subscription forms and our shopping cart. Our internal system will hold much more detailed information about our prospects and will be updated every time we deal with the prospect whether that be by phone, mail, email etc. From the web we will simply get information such as email address, name, company name, telephone and country via a form.
The idea is that if someone wants to subscribe via the web they are in effect a prospect for our company because they are interested in our products. So our internal DB will have lots of information about each prospect and be updated frequently whereas the web form is a small information gathering tool. Basically what I'll need to set-up is some sort of system which: 1) Validates user input from the web (php) 2) Sends the information to the external website DB for future customer login authentication (php> mysql>update/insert) 3) Sends the information to our internal website DB (Intranet server) (email or replication?) 4) Flags our people here when a new prospect arrives (php>email) 5) Full front end system for the prospect details etc (Intranet server). (php/mysql) The MySQL replication documentation is for someone experienced with MySQL and understands the replication concept fully. This is the first time I have even looked at it and I'm a bit unclear. For instance I would assume that my Master DB would be my Internal server but it's just that, an assumption. Also how would I go about configuring an externally hosted web db to be it's slave? Would I need the sysadmin of our web host company to do it? Looking at the documentation it appears that the two databases need to have exactly the same data structure (I think) if they are to be reproduced so if I have 30 fields on my intranet DB for prospects and only five on my externally hosted web DB would replication even be an option? Or is it simply the individual fields which need to be the same? The only part I have a problem with is number 3. Jason Wong has suggested one solution which I can probably get working in a few days when I get more information on how STDIN works but suggestions have been that I should look at replication as more robust and efficient. What (based on what I have told you) would you do? Any help much appreciated. > > RTFM: > http://www.mysql.com/documentation/mysql/bychapter/manual_MySQ > L_Database_Administration.html#Replication > > This really seems to be what you need. Any php-level solution > is going to be kludgy and slow by comparison and prone to > problems. Go with the tested, production code. It sounds like > you may also have a gray area in your requirements that you > should clarify. How current does the internal db need to be? > Is a once-a-day replication ok for crm applications or does > it need to be in "real-time"? Clarifying this point can > really help you out in terms of what your solution needs to be. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php