+ Reply to Thread
Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26
This is a discussion on Salesforce – PHP To MySQL Database Replication Script within the Salesforce PHP Tutorials forums, part of the Salesforce category; Originally Posted by mike My goals? None really, just trying to help
  1. #21
    slugmandrew is offline Junior Member
    Join Date
    Aug 2007
    Posts
    10
    Quote Originally Posted by mike View Post
    My goals? None really, just trying to help that is all.... and do my job (which pays the bills)
    Well mike, you are helping me that's for sure. I kinda meant the goal for your backup system that you talked about previously but you already covered it i guess. Are you now just improving the usability of your company's system by adding the interface? Or are you trying to make a replication and backup system for total newbies. (i.e. point and click with no coding)

    I'm planning to use the mirror of my salesforce data on my own site and let users modify it, then update the data back to salesforce. I thought you might still be developing your own systems for your business which could be pretty different from what we need.

    Anyways I'll add my msn to my account and we can talk.

  2. #22
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    607
    Blog Entries
    16
    Ahh sorry for the misrepresentation, my usual problem, LOL


    I want to improve the application that I released to not only create the database, but to be able to perform the downloads. I guess this is more for total newbies and the point and click thingy, but at the same time share the coding with others.


    and who knows, you look at one of my coding examples or vice versa, or another developer then a new idea may pop into your head or mine

    I guess that is all, I just like helping people!

  3. #23
    slugmandrew is offline Junior Member
    Join Date
    Aug 2007
    Posts
    10
    No don't apologise, there's no problem at all. It's hard to get your point across on message boards I find.

    The point-and-click app sounds like it would be great, but also by making it that modular we should be able to modify it more easily to work in or with other apps as well. Just making it more versatile I guess.

    I agree that it's great to have people to bounce (or steal) ideas off. Hopefully more people will join in too. There must be more people wanting to use php with salesforce. I thought it was weird that most of the examples are in Java or C#.

    I added you on msn btw. Speak to you soon.

    Drew.

  4. #24
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    607
    Blog Entries
    16
    Quote Originally Posted by slugmandrew View Post
    The point-and-click app sounds like it would be great, but also by making it that modular we should be able to modify it more easily to work in or with other apps as well. Just making it more versatile I guess.

    I added you on msn btw. Speak to you soon.

    Drew.

    Yeah there are a few more PHP developers that I know of. David Claiborne is a top notch coder who has taught me a lot. there is Scott Hemmeter from Arrowpointe, and Redsummit on the salesforce forums seems to know what they are doing, more so than me

    David has helped me TONS and is really a wealth of knowledge

    I hope one day he joins here and then adds some stuff

    anyway catch you later Drew, thanks for all the chat

  5. #25
    nil_von_9wo is offline Junior Member
    Join Date
    Aug 2009
    Posts
    10
    I've got a problem coming up with this bit.

    PHP Code:
    $sql $db->execute("INSERT INTO sforce_account
    (id, name, type, parentid,  billingstreet, billingcity, billingstate, billingpostalcode, billingcountry, shippingstreet,
    shippingcity,shippingstate,shippingpostalcode,shippingcountry,phone,fax,accountnumber,website,sic,industry,
    annualrevenue,numberofemployees,ownership,tickersymbol,description,rating,site,ownerid,createddate,createdbyid,
    lastmodifieddate,lastmodifiedbyid,systemmodstamp,lastactivitydate)
                                
    VALUES ('
    {$pass_this['id']}', '{$pass_this['name']}','{$pass_this['type']}','{$pass_this['parentid']}' , 
    '
    {$pass_this['billingstreet']}', '{$pass_this['billingcity']}','{$pass_this['billingstate']}',
    '
    {$pass_this['billingpostalcode']}','{$pass_this['billingcountry']}',
    '
    {$pass_this['shippingstreet']}','{$pass_this['shippingcity']}','{$pass_this['shippingstate']}','
    {$pass_this['shippingpostalcode']}','{$pass_this['shippingcountry']}',
    '
    {$pass_this['phone']}','{$pass_this['fax']}','{$pass_this['accountnumber']}',
    '
    {$pass_this['website']}','{$pass_this['sic']}',
    '
    {$pass_this['industry']}','{$pass_this['annualrevenue']}',
    '
    {$pass_this['numberofemployees']}','{$pass_this['ownership']}',
    '
    {$pass_this['tickersymbol']}','{$pass_this['description']}',
    '
    {$pass_this['rating']}','{$pass_this['site']}','{$pass_this['ownerid']}',
    '
    {$pass_this['createddate']}','{$pass_this['createdbyid']}','{$pass_this['lastmodifieddate']}',
    '
    {$pass_this['lastmodifiedbyid']}','{$pass_this['systemmodstamp']}','{$pass_this['lastactivitydate']}' )"); 
    When I execute the script, this results in:

    Debug Error: /SalesforcePHPTutorials/includes/adodb5/adodb-exceptions.inc.php line 78 - Uncaught exception '
    ADODB_Exception' with message 'mysql error: [1366: Incorrect integer value: '' for column 'AnnualRevenue' at row 1]
    in EXECUTE("INSERT INTO sforce_account (id, name, type, parentid, billingstreet, billingcity, billingstate, billingpostalcode,
    billingcountry, shippingstreet,

    shippingcity,shippingstate,shippingpostalcode,ship pingcountry,phone,fax,accountnumber,website,sic,in dustry,
    annualrevenue,numberofemployees,ownership,tickersy mbol,description,rating,site,ownerid,createddate,c reatedbyid,
    lastmodifieddate,lastmodifiedbyid,systemmodstamp,l astactivitydate)
    VALUES ('0018000000XOdBRAA1', 'Other Eden','','' , '', '',
    '','','', '',
    '','','','',
    '','','','','',
    '','','','',
    '','','','','00580000002h6owAAA',
    '2009-09-15T16:59:37.000Z','00580000002h6owAAA','2009-09-16T14:27:41.000Z','00580000002h6owAAA',
    '2009-09-16T14:27:41.000Z','' )")
    ' in D:\Brian Stuff\Education\PHP\SalesforcePHPTutorials\include s\adodb5\adodb-exceptions.inc.php:78
    Stack trace:
    #0 D:\Brian Stuff\Education\PHP\SalesforcePHPTutorials\include s\adodb5\adodb.inc.php(1043): adodb_throw('mysql', 'EXECUTE', 1366,
    'Incorrect integ...', 'INSERT INTO sfo...', false, Object(ADODB_mysql))
    #1 D:\Brian Stuff\Education\PHP\SalesforcePHPTutorials\include s\adodb5\adodb.inc.php(1018):
    ADOConnection->_Execute('INSERT INTO sfo...', false)
    #2 D:\Brian Stuff\Education\PHP\SalesforcePHPTutorials\account s_mysql_replication_tutorial.php(96):
    ADOConnection->Execute('INSERT INTO sfo...')
    #3 D:\temp\user\tmp\dummy.php(1): include('D:\Brian Stuff\...')
    #4 {main}
    thrown

    So far as I can tell, the script is trying to send all the values within quotes, which mySQL doesn't like
    when it comes to integers such as AnnualRevenue.

    Any idea how to fix this? I tried to remove some of the quotes from the values, but that just seemed to make things worse.

    -Brian.

  6. #26
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    607
    Blog Entries
    16
    I emailed you a script example that is working currently in a production environment.

    All you should need to do is

    1) change the login and paths to match yours
    2) change your SOQL query
    3) and ensure your MySQL table matches your Salesforce Object/Table


    I am extremely busy at the moment working on my masters program and my time is very limited. I will do my best to look at your posts

    ~Mike

+ Reply to Thread
Page 3 of 3 FirstFirst 123

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO 3.5.2