Where and when do you use the quote method in PDO? I’m asking this in the light of the fact that in PDO, all quoting is done by the PDO object therefore no user input should be escaped/quoted etc. This makes one wonder why worry about a quote method if it’s not gonna get used in a prepared statement anyway?
Share
While this may not be the only use-case it’s the only one I’ve needed
quotefor. You can only pass values usingPDO_Stmt::execute, so for example this query wouldn’t work:quotecomes in so that you can do this:and still expect
$columnto be filtered safely in the query.