Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005
    Location
    Perth, Western Australia, Australia
    Posts
    781
    Plugin Contributions
    0

    red flag Referral sources SQL error

    Hi,

    I have recently found out that I have a sql error in the referral sources page in my admin. Does anyone know how this happened?

    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's web site' order by ci.customers_info_id DESC' at line 1
    in:
    [select ci.customers_info_id, ci.customers_info_date_account_created from zen_customers_info ci, zen_sources_other so where so.customers_id = ci.customers_info_id and so.sources_other_name = 'Spy's web site' order by ci.customers_info_id DESC]
    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.

    Please help. Thanks in advance :)
    The Team Behind DealByEthan.com | Curating unique finds for a discerning community. Committed to a seamless and inspiring shopping experience. Connect with us: https://linktr.ee/dealbyethan


  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Referral sources SQL error

    You've added a single-quote mark in one of your referral sources: "Spy's web site".
    Clearly that mod doesn't properly protect against that.
    So, you have 2 options:
    - don't use single-quotes (this is the fastest and simplest)
    - rewrite the code to support single-quotes
    .

    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
    Dec 2005
    Location
    Perth, Western Australia, Australia
    Posts
    781
    Plugin Contributions
    0

    Default Re: Referral sources SQL error

    Thank you DrByte. I deleted the single quote in phpmyadmin and the error went away.
    The Team Behind DealByEthan.com | Curating unique finds for a discerning community. Committed to a seamless and inspiring shopping experience. Connect with us: https://linktr.ee/dealbyethan


 

 

Similar Threads

  1. v139h DB/SQL Error when using SQL Patch for Add Pages More Info Sidebox addon
    By maperr55 in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 5 Mar 2012, 09:32 PM
  2. Replies: 1
    Last Post: 25 Aug 2011, 05:58 AM
  3. SQL error in Referral Sources addon
    By eaddesigns in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 8 Oct 2008, 12:51 AM
  4. Referral Sources- How to add more?
    By bluealice in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 3 Jul 2008, 08:51 PM
  5. what is Referral / how to use Referral in zencart?
    By jikey in forum Basic Configuration
    Replies: 1
    Last Post: 20 Mar 2007, 04:31 AM

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