PHP Method Doctrine\DBAL\Connection::quote Code ExamplesUsing a database implies retrieval of data. It is the primary use-case of a database. For this purpose each database vendor exposes a Client API that can be integrated into dbal quote languages. However because of disagreements between the PHP community there are often dbal quote extensions for each database vendor that are much more maintained OCI8 for example. The query method executes the SQL and returns a database statement object.
mysql - How to escape single quotes in Doctrine - Stack Overflow
For example, title needs to be escaped as it contains a single quote: Abs 18k 82 Stefan Rasmusson 4, 3 16 I just want to know how to escape single quotes, I don't really want to change how things work.
Is there no options for simple escaping in Doctrine? If the purpose is to escape something for a query, always use prepared statements. Doing anything else is just an invitation for SQL injection. I guess I'll go with prepared statements then.
I got a good explanation from a user named zomg on the doctrine IRC channel. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.