Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009
    Posts
    354
    Plugin Contributions
    0

    Default best single quotation solution?

    I have unavoidably had to add the category names to an existing table. However one of the names has ' in it which is causing a problem with the sql query. What is the best way to treat this as a regular character rather than attempt to effect the query??

    _thanks

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: best single quotation solution

    If I understand the question, the way to escape special characters is to place a backslash before them: Mary\'s Kitchen.

  3. #3
    Join Date
    Feb 2009
    Posts
    354
    Plugin Contributions
    0

    Default Re: best single quotation solution

    I was getting some data from one table and storing it into another and I found the addslashes() feature to work.

    _thanks

 

 

Similar Threads

  1. Best solution to receive credit card payment?
    By bennyblue in forum General Questions
    Replies: 4
    Last Post: 17 Feb 2011, 06:11 PM
  2. Ez-pages question and best solution
    By 0be1 in forum General Questions
    Replies: 0
    Last Post: 8 Jul 2008, 04:45 PM
  3. Not the best solution i now
    By Tmw-Websites in forum General Questions
    Replies: 9
    Last Post: 8 May 2008, 05:19 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