Results 1 to 3 of 3
  1. #1
    Join Date
    May 2005
    Posts
    51
    Plugin Contributions
    0

    Default BUG - Parenthesis in last name breaks customer lookup

    When there are any parenthesis in the customer's last name, the customer lookup is broken. For instance, I log in to admin and from the homepage I see a list of "New Customers". If I click to user's name there to search for them, I get the following error:

    1139 Got error 'parentheses not balanced' from regexp
    in:
    [select count(*) as total from customers c left join customers_info ci on c.customers_id= ci.customers_info_id left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id where c.customers_lastname like '%List - ( Carniva Miracle%' or c.customers_firstname like '%List - ( Carniva Miracle%' or c.customers_email_address like '%List - ( Carniva Miracle%' or c.customers_telephone rlike 'List - ( Carniva Miracle' or a.entry_company rlike 'List - ( Carniva Miracle' or a.entry_street_address rlike 'List - ( Carniva Miracle' or a.entry_city rlike 'List - ( Carniva Miracle' or a.entry_postcode rlike 'List - ( Carniva Miracle']
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

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

    Default Re: BUG - Parenthesis in last name breaks customer lookup

    Just searched over Google for this type of error and this is what I have determined;

    In your admin/customers.php file,

    find :

    PHP Code:
    $search "where c.customers_lastname like '%" $keywords "%' or c.customers_firstname like '%" $keywords "%' or c.customers_email_address like '%" $keywords "%' or c.customers_telephone rlike '" $keywords "' or a.entry_company rlike '" $keywords "' or a.entry_street_address rlike '" $keywords "' or a.entry_city rlike '" $keywords "' or a.entry_postcode rlike '" $keywords "'"
    replace with:

    PHP Code:
    $search "where (c.customers_lastname like '%" $keywords "%') or (c.customers_firstname like '%" $keywords "%') or (c.customers_email_address like '%" $keywords "%') or (c.customers_telephone rlike '" $keywords "') or (a.entry_company rlike '" $keywords "') or (a.entry_street_address rlike '" $keywords "') or (a.entry_city rlike '" $keywords "') or (a.entry_postcode rlike '" $keywords "')"

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

    Default Re: BUG - Parenthesis in last name breaks customer lookup

    Just searched over Google for this type of error and this is what I have determined;

    In your admin/customers.php file,

    find :

    PHP Code:
    $search "where c.customers_lastname like '%" $keywords "%' or c.customers_firstname like '%" $keywords "%' or c.customers_email_address like '%" $keywords "%' or c.customers_telephone rlike '" $keywords "' or a.entry_company rlike '" $keywords "' or a.entry_street_address rlike '" $keywords "' or a.entry_city rlike '" $keywords "' or a.entry_postcode rlike '" $keywords "'"
    replace with:

    PHP Code:
    $search "where (c.customers_lastname like '%" $keywords "%') or (c.customers_firstname like '%" $keywords "%') or (c.customers_email_address like '%" $keywords "%') or (c.customers_telephone rlike '" $keywords "') or (a.entry_company rlike '" $keywords "') or (a.entry_street_address rlike '" $keywords "') or (a.entry_city rlike '" $keywords "') or (a.entry_postcode rlike '" $keywords "')"
    Additionally, this is what admin/linkpoint_review.php states similarly:

    PHP Code:
    $search "where lp.customer_id = c.customers_id and (c.customers_lastname like '%" $keywords "%' or c.customers_firstname like '%" $keywords "%' or c.customers_email_address like '%" $keywords "%' or c.customers_telephone rlike '" $keywords "' or c.customers_id='" $keywords "')"
    The parenthese are in.

 

 

Similar Threads

  1. Customer Last Name
    By goldfox in forum General Questions
    Replies: 13
    Last Post: 16 Dec 2011, 03:44 AM
  2. How do I hide customer's last name on product reviews?
    By Bob88Vette in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 18 May 2010, 06:01 PM
  3. customer review first name last initial
    By shoesocks.com in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 23 Feb 2010, 06:24 AM
  4. Admin-Customer Last Login ip address lookup?
    By Justwade in forum General Questions
    Replies: 2
    Last Post: 20 Dec 2006, 08:01 AM
  5. Admin Customer Name, First/Last reversed
    By Peace Freak in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 3 Sep 2006, 08:03 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