Thread: Debugging SQL

Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2011
    Location
    Brighton UK
    Posts
    27
    Plugin Contributions
    0

    Default Debugging SQL

    Hi All,
    I am customising a zen cart installation with custom product types. I have managed to add 3 custom types so far and they work perfectly.

    Now I am adding another - but the update function is not working.

    No errors are displayed
    No errors appear in the log files in the cache folder
    Collect_info works (if I manually create the fields in custom products _extras table) using the same const which defines the table.

    But no record is inserted or updated into the _extras table I have defined for the custom product type when update_product.php is called.

    Is there a way I can force Zen to show me the response from $db->execute() in zen_db_perform(...)

    Or is there any other way to see the query and response from executing it?

    I thought some of the date / time fields the product using could be likely issues but have been pruning them from the query until it really is a stupidly simple query but still no record is entered.

    PHP Code:
    $sql_data_array = array('products_id' => $products_id,              
                                  
    'tutor' => $tutor,
                                  
    'lunch' => $lunch,
                                  
    'refreshments' => $refreshments);
    zen_db_perform(TABLE_PRODUCT_WORKSHOP_EXTRA$sql_data_array'update'"products_id = '" . (int)$products_id "'"); 
    Thanks in advance for your time

  2. #2
    Join Date
    Aug 2011
    Location
    Brighton UK
    Posts
    27
    Plugin Contributions
    0

    Default Re: Debugging SQL

    OMG!

    Please delete this thread I have discovered the issue - it only took me three hours!

    Are you ready?

    It helps if you edit the correct update_product.php file





    Have a nice day :)

 

 

Similar Threads

  1. Debugging ZenCart
    By c00lw09 in forum General Questions
    Replies: 2
    Last Post: 2 Mar 2008, 09:45 PM
  2. Debugging a Notice
    By asdf in forum General Questions
    Replies: 2
    Last Post: 10 May 2007, 11:30 PM

Posting Permissions

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