Results 1 to 3 of 3

Thread: retrieve records from table

  1. #1
    agvg is offline Sugar Community Member
    Join Date
    Sep 2006
    Posts
    16

    Default retrieve records from table

    i am new to sugarcrm and php so, can anyone plz help me out to find out how can i retrieve data from cases table into sugar. wht i have done is i have some records which are direclty stored from php script into cases table and i now want to retrieve them without entering them manulay from sugarcrm.so,can anyone tel me how can i store records directlyfrom php into cases table.
    or other way can be i create a new table in sugarcrm databse and from this table i can retrieve records dircetly into cases sugarcrm frontend.
    so, can anyone tel me which one is better and how to achieve it.

    can anyone tel me how can i do so.

    i am using win-xp
    sugarcrm4.2.1
    mysql

  2. #2
    hlomko is offline Member
    Join Date
    Sep 2006
    Posts
    7

    Default Re: retrieve records from table

    I think for the current problem you need to use aCase class (from modules/Cases/case.php file).

    For example:
    Code:
    require_once('modules/Cases/Case.php');
    $obj = new aCase();
    $obj->retrive(some_id); // loads an existing record from the cases table into $obj
    ....   //  working with $obj. NOTE: each column in DB table сorrespond to field in $obj with the same name
    $obj->save(); //update record in DB
    Last edited by hlomko; 2006-11-16 at 09:35 AM.

  3. #3
    agvg is offline Sugar Community Member
    Join Date
    Sep 2006
    Posts
    16

    Default Re: retrieve records from table

    thnx for reply..
    can u plz elaborate it more...

    the problem is with the id which gets generated automatically in cases table.when i treid to enter record dirctly from php script , then i got stuck on id,case_number, which gets generated automaically before but ,how can i aasign the value to these fileds manually.
    Last edited by agvg; 2006-11-15 at 08:59 AM.

Thread Information

Users Browsing this Thread

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

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
  •