PDO::quote--does it work?

Discussion in 'PHP' started by Tony Brar, Nov 17, 2012.

  1. #1
    Hi everyone,

    I have a question (duh).
    Does PDO::quote actually work?
    On the PDO::quote page (http://us3.php.net/manual/en/pdo.quote.php), it says the return value is a string 'theoretically safe' to pass into a query.
    Also, in an example, this is the output of a string that has gone through PDO::quote: 'Naughty '' string'
    That string looks like it would cause an error.
    What's up with this?
    I don't get how that string is even theoretically safe.
    Can someone illuminate me?

    Thanks,
    -Tony
     

    Attached Files:

    • pic.jpg
      pic.jpg
      File size:
      8 KB
      Views:
      105
    Tony Brar, Nov 17, 2012 IP
  2. abhirampathak3

    abhirampathak3 Peon

    Messages:
    44
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Create a php.ini file with the following:
    magic_quotes_gpc = Off extension=pdo.so extension=pdo_mysql.so
     
    abhirampathak3, Nov 19, 2012 IP
  3. Tony Brar

    Tony Brar Active Member

    Messages:
    220
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    75
    #3
    That doesn't really answer my question...

    -Tony
     
    Tony Brar, Nov 19, 2012 IP