Different databases have slight variations in their implementations of SQL. Does PDO handle this?
If I write an SQL query that I use with PDO to access a MySQL database, and later tell PDO to start using a different type of database, will the query stop working? Or will PDO ‘convert’ the query so that it continues to work?
If PDO does not do this, are there any PHP libraries that allow me to write SQL according to a particular syntax, and then the library will handle converting the SQL so that it will run on different databases?
From PHP manual :
So,you can not change the database and expect that everything works as before. It depends on the queries you have used. Are they “simple” SQL92 queries or do they use special features for a specific db…
Ex a mysql query with “LIMIT 10,20” must be rewritting to work with an Oracle DB or Sqlite. They use “LIMIT 20 OFFSET 10”