function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
t14t14 

synchronizing salesforce and a mysql database

Hi

 

Is there a real time solution for synchronizing salesforce and a mysql database using the php toolkit.

 

Im developing a script that gets information from salesforce and stores it in a mysql database.

 

The script compares the data that is on salesforce and mysql and updates the mysql data to match what is stored in salesforce.

 

When a change is made on salesforce is their a way to trigger my php update script to run automatically.

 

 

PlukePluke

Hi t14,

 

I have a functioning update script, that works on the on the last updated field from the salesforce table.  So that it only pulls the records that have been updated since your last salesforce backup.  The solution borrows heavily from Mike Simonds brilliant website. You can find the code here:

 

http://sourceforge.net/projects/unforced/ 

 

The code you are looking for is in functions\sf_mysql_functions.php with the specific function call as below: 

 

function backup_into_mysql($tables, $o_prefix, $o_host, $o_user, $o_pass, $o_db, $wsdl, $user, $pass, $update=false) 

 

This should save you a bit of time in writing the update script.  You then need to attach it to a webservice, and call that remotely from SF, I've never done this with PHP before, but it's possible.

 

Any questions please get in touch.

 

Thanks

 

Pete 

Message Edited by Pluke on 01-10-2010 07:39 AM