SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: \\\'

  1. #1
    SitePoint Evangelist =X='s Avatar
    Join Date
    Jun 2001
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    \\\'

    there is a strange thing about mysql...or at least for me

    on my own db, I saw that when i use addslashes, it makes eg "it's": "it\\\'s"

    I thought I did something wrong, but couldn't find a thing, so I left it like that...

    now, we have a phpbb forum on f2s, wich sucked so hard (alwasy down) that we decided to move it to another forum.
    when moving sql data, all went well, exept the posts, he gave this error:
    MySQL said: You have an error in your SQL syntax near 's a (computer guided) spanish armada ship wich is stronger then yours etc due to' at line 1
    thining of my own database, I said: try replacing the \' with \\\' and magicly it worked!!

    now why does '\ works on f2s and not on other servers??
    PHP-Webservices - Profesional Hosting and Programming of sites.

  2. #2
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \\\'

    Originally posted by =X=
    I saw that when i use addslashes, it makes eg "it's": "it\\\'s"
    That is because magic quotes are on in php.ini. If you can edit it look for this section:

    ; Magic quotes
    magic_quotes_gpc = On
    magic_quotes_runtime = Off

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  3. #3
    SitePoint Evangelist =X='s Avatar
    Join Date
    Jun 2001
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah ok
    btw I meant 3 slashes, but vbulletin made only 2 of it...
    PHP-Webservices - Profesional Hosting and Programming of sites.


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
  •