Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Error when confirming delete customer

    Quote Originally Posted by DrByte View Post
    I couldn't agree more.
    But the pain of renaming all the fields in almost a hundred tables is an upgraders nightmare! We debate it during every other upgrade release.
    We've considered that for v2. But in reality, if we provide proper functions to allow all those things to happen thru function calls, then (almost) nobody should be writing their own queries anyway, thus minimizing the risk of the pain impacting many people other than perhaps mod-developers until they switch over to using the (some yet to be written) built-in functions.
    Best to bite the bullet and "geter done!" This also has to happen with the CSS code and whether everything happens quickly or at least as fast as a turtle can run, many hands make the work load lighter.

    With hindsight for guidance and advancements in modular code, shouldn't take as long as one might think. Especially if we all bite the bullet and realize at some point, legacy code needs to be left behind and cannot be used for the newer, more easier to work with coding which will be better for all.

  2. #12
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,692
    Plugin Contributions
    9

    Default Re: Error when confirming delete customer

    Quote Originally Posted by Website Rob View Post
    Best to bite the bullet and "geter done!" This also has to happen with the CSS code and whether everything happens quickly or at least as fast as a turtle can run, many hands make the work load lighter.

    With hindsight for guidance and advancements in modular code, shouldn't take as long as one might think. Especially if we all bite the bullet and realize at some point, legacy code needs to be left behind and cannot be used for the newer, more easier to work with coding which will be better for all.
    having dealt with (and continuing to deal with) my share of legacy code, it is much easier to be on the outside looking in, and telling the dev team what to do, then to actually do it.

    once named, changing variables down the line presents all kinds of problems; lets say the dev team makes the change. what then happens to all of the plugins modifications one has done to their implementation of ZC? what about those plugins that do not have any person(s) maintaining the code? and frankly is it worth the dev team to focus on this as opposed to other features?

  3. #13
    Join Date
    Jul 2007
    Posts
    18
    Plugin Contributions
    1

    Default Re: Error when confirming delete customer

    Code:
            $db->Execute("delete from " . TABLE_WHOS_ONLINE . "
                          where customer_id = '" . (int)$customers_id . "'");
    
        	$db->Execute("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where customers_id = " . $customers_id);
    [/QUOTE]

    This one
    where customers_id = '" . (int)$customers_id . "'");
    is working for me too. I saw this tread afterwards. Which one is better?

  4. #14
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Error when confirming delete customer

    Quote Originally Posted by stefanb View Post
    Code:
            $db->Execute("delete from " . TABLE_WHOS_ONLINE . "
                          where customer_id = '" . (int)$customers_id . "'");
    
        	$db->Execute("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where customers_id = " . $customers_id);
    This one is working for me too. I saw this tread afterwards. Which one is better?[/QUOTE]
    Casting the value to int is better (more secure) though the single quotes around that value are unnecessary and requires the sql database to convert the now string into an integer (in a sense double casting by variable to integer inserted into sql as a string that is then converted to a number/integer from there), so this would be the better of the two:
    Code:
    where customers_id = " . (int)$customers_id);
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Fatal Error When Trying to Delete Products
    By Psykryph in forum General Questions
    Replies: 1
    Last Post: 5 Jan 2012, 05:27 AM
  2. Replies: 7
    Last Post: 2 Sep 2010, 11:30 PM
  3. Replies: 1
    Last Post: 3 Oct 2009, 03:38 PM
  4. i cant delete customer...getting error
    By lastpirate007 in forum Managing Customers and Orders
    Replies: 3
    Last Post: 22 Oct 2008, 04:43 AM
  5. Emergency!!! - Fatal Error when confirming order.
    By CheapStairParts in forum General Questions
    Replies: 2
    Last Post: 14 Apr 2008, 08:47 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR