Results 1 to 10 of 24

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Posts
    17
    Plugin Contributions
    0

    Default Re: Business Activity Report 1.5.0 Support Thread

    i was having a problem with "[INSERT INTO dg_businessTS_detail" and found a customer had an apostrophe in his name,
    i corrected it by adding mysql_real_escape_string() to the customers name in the insert query.

    changed line 189
    Code:
    $insert = "INSERT INTO dg_businessTS_detail (order_date, orders_id, customers_name, payment_method, subtotal, coupon, discount, tax, shipping, order_total) VALUES ('" . $dataset->fields['orderdate'] . "', " . $dataset->fields['orders_id'] . ", '" . $dataset->fields['customers_name'] . "', '". $dataset->fields['payment_method'] . "', " . $dataset->fields['subtotal'] . ", " . $dataset->fields['coupons'] . ", " . $dataset->fields['discounts'] . ", " . $dataset->fields['tax'] . ", " . $dataset->fields['shipping'] . ", " . $dataset->fields['ordertotal'] . ")";
    to

    Code:
    $insert = "INSERT INTO dg_businessTS_detail (order_date, orders_id, customers_name, payment_method, subtotal, coupon, discount, tax, shipping, order_total) VALUES ('" . $dataset->fields['orderdate'] . "', " . $dataset->fields['orders_id'] . ", '" . mysql_real_escape_string($dataset->fields['customers_name']) . "', '". $dataset->fields['payment_method'] . "', " . $dataset->fields['subtotal'] . ", " . $dataset->fields['coupons'] . ", " . $dataset->fields['discounts'] . ", " . $dataset->fields['tax'] . ", " . $dataset->fields['shipping'] . ", " . $dataset->fields['ordertotal'] . ")";
    probably should correct this elsewhere so it gets properly inserted, but that's for another post!

    hope this helps someone,

    Sean

  2. #2
    Join Date
    Mar 2010
    Posts
    7
    Plugin Contributions
    0

    Default Re: Business Activity Report 1.5.0 Support Thread

    Hi,

    When I run the SQL patch I receive the following errors
    Warning: file() [function.file]: open_basedir restriction in effect. File(/tmp/php_upload/phpDnOeA3) is not within the allowed path(s): (VIRTUAL_DOCUMENT_ROOT:/usr/local/lib/php:/usr/local/lib/ph:/home/chroot_lib/phplib/:/usr/local/bin/) in /home/c-web/cf/fb/ iceboxcoolers.com.au / public / www / admin / sqlpatch.php on line 693

    Warning: file(/tmp/php_upload/phpDnOeA3) [function.file]: failed to open stream: Operation not permitted in /home/c-web/cf/fb/ iceboxcoolers.com.au / public / www / admin/sqlpatch.php on line 693

    Anyone have any idas on how to fix this ?
    Alan

 

 

Similar Threads

  1. v152 Support Thread: Report All Errors (Even Warnings)
    By lat9 in forum Addon Admin Tools
    Replies: 34
    Last Post: 1 Feb 2020, 05:42 PM
  2. v151 Sales Report with Graphs support thread
    By JacobBushnell in forum Addon Admin Tools
    Replies: 17
    Last Post: 25 Jul 2019, 02:27 PM
  3. All Business template Support Thread
    By picaflor-azul in forum Addon Templates
    Replies: 994
    Last Post: 23 Apr 2019, 04:44 PM
  4. v153 Linked Products Report [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 11 Jun 2015, 09:52 PM
  5. Admin Activity Report [support thread]
    By Steven300 in forum All Other Contributions/Addons
    Replies: 17
    Last Post: 6 Aug 2009, 12:47 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