Results 1 to 6 of 6

Thread: mysql update statement - where is it?

  1. #1
    netron is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    85

    Default mysql update statement - where is it?

    i'm trying to debug a contact form (sugar 4.5.1) and i'd just like to see what mysql statement is being issued by sugar when i update a contact.

    is there any way of turning on the mysql statements to print to screen for debugging purposes?

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: mysql update statement - where is it?

    Enabling the debug log would be the easiest way of doing this.

    To enable it, open the file log4php.properties located in the root directory of your Sugar installation.

    Modify it so it looks like this:

    Code:
    //log4php.rootLogger=fatal, A2
    //log4php.rootLogger=error, A2
    //log4php.rootLogger=warn, A2
    //log4php.rootLogger=info, A2
    log4php.rootLogger=debug, A2
    Save the file and perform your actions. The log will be written to sugarcrm.log, which is also written to your root install directory.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    netron is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    85

    Default Re: mysql update statement - where is it?

    thats exactly what i'm after. thank you.

  4. #4
    netron is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    85

    Default Re: mysql update statement - where is it?

    that logging of some assistance but i am no nearer to figuring out why my additional form field contents are not making their way into the sugar update query.

    i can see (from doing a print_r($_POST) in index.php) that my extra field is being POSTed across
    but somehow sugar transforms this into a null value when it does its mysql update.


    the extra field is in modules/Contacts/vardefs , and in EditView.html

    are there any gotchas with regards to adding extra form fields that i might need to be aware of?

  5. #5
    netron is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    85

    Default Re: mysql update statement - where is it?

    some details:

    the field i'm trying to add to the contacts editview is "bdm"


    database altered:
    alter table contacts add `bdm` varchar(50) not null;

    added to modules/Contacts/vardefs.php:

    'bdm' => array (
    'name' => 'bdm',
    'vname' => 'LBL_BDM',
    'type' => 'varchar',
    'len' => '50',
    'comment' =>'biz dev manager'
    )

    went into Studio - added field to contacts editview.

    however the data i input into that bdm field never ends up in the contacts table - evne though i can see it in the $_POST request.

    is there something else i need to tell sugar so that it recognises the field?

  6. #6
    netron is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    85

    Default Re: mysql update statement - where is it?

    not to worry - i've figured it out using custom fields instead.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 2007-11-13, 02:51 PM
  2. Huge backups -- normal?
    By Liam in forum Help
    Replies: 5
    Last Post: 2007-05-02, 05:36 AM
  3. Replies: 7
    Last Post: 2007-02-14, 03:48 PM
  4. MySQL error/no workflow notifications
    By rlbyrd in forum Help
    Replies: 1
    Last Post: 2006-09-11, 09:14 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
  •