Results 1 to 2 of 2

Thread: Use global $db outside sugarcrm

  1. #1
    akkimca's Avatar
    akkimca is offline Sugar Community Member
    Join Date
    Dec 2008
    Posts
    270

    Question Use global $db outside sugarcrm

    Hi..

    i m using sugarcrm 5.5.1 and i have requirement to use global $db outside sugarcrm application.
    I have two application(one is Sugarcrm and second is core php application) which using same database of sugar. In my other application i written core php code which first take the data from sugar database and do operation like insert/update/delete and list out the data.


    so i need my core php application use sugarcrm global $db(sugar database connection and all database operation) so by this if i upgrade or change the database it also effect my core php application and in future if i change my database or upgrade it wont effect my core php application.
    i try this code
    PHP Code:
     if(!defined('sugarEntry'))define('sugarEntry'true); 
        require_once(
    '../sugarcrm/include/entryPoint.php'); 

       
        global 
    $sugar_config
        
    $db = & PearDatabase::getInstance(); 
    but didnt get any success

    please help me to solve this requirement
    Regards
    ==========================
    akkimca
    Work as Sugarcrm Freelancer
    Feel free to Find me in skype. Its my pleasure to talk with you.
    ID: akshay.biztech

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Use global $db outside sugarcrm

    For any applications that need to connect to the Sugar db I've always had to do so with an external db lib.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Global Variable
    By ishaan in forum Developer Help
    Replies: 5
    Last Post: 2009-05-23, 09:14 AM
  2. Global dashlet changes?
    By mdbusse in forum Help
    Replies: 4
    Last Post: 2009-02-11, 06:34 PM
  3. SugarCRM: Global Implementation Services
    By dtokeefe in forum Classifieds
    Replies: 1
    Last Post: 2009-01-29, 09:59 PM
  4. Global ad posting
    By typ1248 in forum Marketing/Campaign Management
    Replies: 0
    Last Post: 2008-01-02, 10:38 AM
  5. Bug? Global Tab order ...
    By dsga1 in forum General Discussion
    Replies: 3
    Last Post: 2007-01-08, 11:45 PM

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
  •