Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default [DONE] SQL Delete statement error from admin's customers page.

    @Wilt:

    From your admin/customers.php file,

    change:

    PHP Code:
    while (!$reviews->EOF) {
                
    $dbExecute("delete from " TABLE_REVIEWS_DESCRIPTION "
                            where reviews_id = '" 
    . (int)$reviews['reviews_id'] . "'");
                
    $reviews->MoveNext();
              } 
    to read:

    PHP Code:
    while (!$reviews->EOF) {
                
    $db->Execute("delete from " TABLE_REVIEWS_DESCRIPTION "
                            where reviews_id = '" 
    . (int)$reviews['reviews_id'] . "'");
                
    $reviews->MoveNext();
              } 
    You forgot to call the method name inside the object name as only an unexistent variable name has been set right now.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,363
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: SQL Delete statement error from admin's customers page.

    Good catch.

    There's another part missing in that same section. The correction is this:
    PHP Code:
    while (!$reviews->EOF) {
                
    $db->Execute("delete from " TABLE_REVIEWS_DESCRIPTION "
                            where reviews_id = '" 
    . (int)$reviews->fields['reviews_id'] . "'");
                
    $reviews->MoveNext();
              } 
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: SQL Delete statement error from admin's customers page.

    I don't see another one like that anywhere on the script as I'm using the latest version. Perhaps it was coded afterwords ?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,363
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: SQL Delete statement error from admin's customers page.

    $reviews['reviews_id']
    vs
    $reviews->fields['reviews_id']
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: SQL Delete statement error from admin's customers page.

    Ahh ! yes, I see it now. Very well, thanks for the update.

 

 

Similar Threads

  1. [Done v1.5] 1.5.0BETA - can't delete customers
    By stevenheintz in forum Bug Reports
    Replies: 1
    Last Post: 13 Aug 2011, 12:05 PM
  2. Page Not Found Error When Uploading SQL Statement
    By DVDTitan in forum General Questions
    Replies: 1
    Last Post: 28 Mar 2011, 10:11 PM
  3. Replies: 7
    Last Post: 19 Apr 2010, 06:31 AM
  4. All customers fields in ADMIN > CUSTOMERS are empty and I can't delete them!
    By plgaudreau in forum Managing Customers and Orders
    Replies: 1
    Last Post: 26 Feb 2008, 02:08 AM
  5. Replies: 2
    Last Post: 3 Sep 2006, 03:34 AM

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