Skip to main content
Commonmark migration
Source Link

#More details and implementation example

More details and implementation example

#Use interfaces for abstraction

Use interfaces for abstraction

#Where to go from here

Where to go from here

#More details and implementation example

#Use interfaces for abstraction

#Where to go from here

More details and implementation example

Use interfaces for abstraction

Where to go from here

edited body
Source Link
Andy
  • 10.4k
  • 4
  • 28
  • 51

As I have said in the comments under this post, if, in the future, you don't want to use the MyMySQLiDriver anymore, you create a new class, be utit MyPDODriver or anything else, which will again implement MyDatabase interface.

As I have said in the comments under this post, if, in the future, you don't want to use the MyMySQLiDriver anymore, you create a new class, be ut MyPDODriver or anything else, which will again implement MyDatabase interface.

As I have said in the comments under this post, if, in the future, you don't want to use the MyMySQLiDriver anymore, you create a new class, be it MyPDODriver or anything else, which will again implement MyDatabase interface.

typos
Source Link
Andy
  • 10.4k
  • 4
  • 28
  • 51

The problem is PDO and mysqli provide different interface to querying, creating transactions, so if useyou used for example mysqli in your application directly and then wanted to switch to PDO, you would have to refactor every single database call in your app.

The problem is PDO and mysqli provide different interface to querying, creating transactions, so if use for example mysqli in your application directly and then wanted to switch to PDO, you would have to refactor every single database call in your app.

The problem is PDO and mysqli provide different interface to querying, creating transactions, so if you used for example mysqli in your application directly and then wanted to switch to PDO, you would have to refactor every single database call in your app.

more details and implementation example in php
Source Link
Andy
  • 10.4k
  • 4
  • 28
  • 51
Loading
Source Link
Andy
  • 10.4k
  • 4
  • 28
  • 51
Loading