- I am currently working on a PHP application that uses the MySQL database for its backend.
- All my queries contain backlinks to avoid field names. This means that I can have fields like "password" in the request without any problems (see. Example)
- I know that backreferences are not universal between relational database engines (e.g. SQLite uses a double quote)
- All requests in my php application are done using the PHP PDO interface
My question is this: if I want to switch database engines, say, from MySQL to SQLite, what do I need to do to handle backlinks in all my queries? I really don't want to go through all my code and change / delete backlinks. Any suggestions? Am I doing something wrong or not as part of best practices?
Request example:
SELECT
`username`,
`password`,
`email_address`
FROM
`users`
WHERE
`id` = '1'
source
share