I'm going to just write a PDO connection, I want to ask you about the framework database model, there are those good suggestions, see a lot of frameworks have a single case and then the method is static method! Want to ask Daniel how to write!
Reply content:
I'm going to just write a PDO connection, I want to ask you about the framework database model, there are those good suggestions, see a lot of frameworks have a single case and then the method is static method! Want to ask Daniel how to write!
Https://github.com/catfan/Medoo
The PDO connection you are going to write, and the Medoo in song Xiao Bei, are actually database adapter.
The model class is primarily data logic or business logic, which is not the same thing at all
By the way, most of it is the implementation of static methods, indicating that the person who wrote the code did not understand OOP, the more the code to write the more rotten