Differences and choices between PDO and MySQLi?

When using PHP to access the database, in addition to the database driver that comes with PHP, we generally have two better options: PDO and MySQLi. In the actual development process, to decide which one to choose, you must first have a relatively comprehensive understanding of both. This article analyzes their differences and compares multiple […]

Encapsulate a mysqli-based php class library

It encapsulates a class library based on mysqli, which now includes basic operations on the database: insert, query, update, delete data, and uses prepared statements and parameter binding to avoid SQL injection attacks. It also does basic validation of table and column names to avoid problems caused by wrong table or column names. If an […]

[Solved] Abnormal database connection create connection error, url jdbcmysqlip database name, errorCode 0, state 08S01 Troubleshooting

Today, a new part of the interface has been added to the project. After the local test is completed, it is packaged and deployed to the test environment. The database connection fails. The error message is as follows: create connection error, url: jdbc:mysql://ip/database name, errorCode 0 , state 08S01, this error message means that the […]