1. What is PDO 2. What Databases does PDO support 3. Where do I begin? 4. Connect to a Database * Connect to PgSQL * Connect to SQLite * Connect to MySQL * Connect to Firebird * Connect to Informix * Connect to Oracle * Connect to ODBC * Connect to DBLIB * Connect to IBM 5. There is no five 6. Close a Database Connection 7. Query a Database * INSERT * SELECT * UPDATE 8. Fetch Modes * FETCH ASSOC * FETCH NUM * FETCH BOTH * FETCH OBJECT * FETCH LAZY * FETCH CLASS * FETCH INTO 9. Error Handling 10. Prepared Statements 11. Transactions 12. Get Last Insert ID 13. Global Instance 14. Conclusions
What is PDO.
PDO is a PHP extension to formalise PHP's database connections by creating a uniform interface. This allows developers to create code which is portable…
PHP has an SSH2 library which provides access to resources (shell, remote exec, tunneling, file transfer) on a remote machine using a secure cryptographic transport. Objectively, it is a tedious and highly frustrating task for a developer to implement it due to its overwhelming configuration options and complex API with little documentation.
The phpseclib (PHPSecure Communications Library) package has a developer friendly API. It uses some optional PHP extensions if they’re available and falls back on an internal PHP implementation otherwise. To use this package, you don’t need any non-default PHP extensions installed.
Installationcomposer require phpseclib/phpseclib
This will in