What is the best PHP pdo mysql class? #pdo mysql
Edit
by gautam - 2 years ago (2022-10-09)
PHP Project using PDO MySQL Class
| I want to create a PHP MySQL project and use a PDO connection class. |
Ask clarification
4 Recommendations
Simple CRUD with MySQL 2: Output SQL and CRUD forms based on remoteDB class
This class can generate SQL and CRUD forms based on remoteDB class.
It is a class derived from the original work by Mahboobz. This version was improved in the following ways:
Version 4:
Update: replaced irp_commonSQL.php (obsolete) with common_pdo.php
Version 3:
- Added 2 more callback: before_save(), before_updated()
- Tested on Master-detail tables: see example pages
- Tested on view tables.
Version 3: added 2 new hooks, and master->detail capability
added 2 functions: setEdit() and setDelete() to control buttons
Version 2:
- Added $this->index array to store one or more PK names (in place of one pre-defined PK='id')
- Added get_where(), get_hidden($record) to handle multiple PKs
- Added optional hook and callback to customize the CRUD page:
1) special input fields: select, radio... (crud_get_input)
2) special edit fields: select, radio... (crud_get_edit)
3) special show fields: links, references... (crud_get_show)
4) more actions in table (crud_action_hook)
- Added 3 static utility: make_select, make_radio and make_checkbox for input/edit fields
- Added CONFIRM to delete
- Added $extrasql parameter to renderVertically(), to extend the basic sql: "SELECT * FROM ".$this->table
- Cosmetic minor variations, use of css file (in: remoteDB/css/style.css)
| by Marco Sillano package author 255 - 2 years ago (2023-03-13) Comment
This package is a simple CRUD application.
Advantage: easy customizable via callbacks.
In this package, the file "common_PDO.php" is a function library (not a class) to access DB using PDO.
Advantage: contains some utilities to access data ( e.g. sqlValue() sqlArray(), etc.) or to get HTML fragments (sqlLookup(), checkList(), etc).
I use it in all my DB-PHP-HTML programs.
hoping it helps someone
m.s.
|
Wepesi PHP ORM Framework: Execute common SQL queries using object functions
This package can execute common SQL queries using object functions.
It provides classes with a fluent interface that allows developers to compose common queries using functions to set query parameters like table names, fields, field values, and condition clauses.
Currently, the main classes provide functions to execute SQL SELECT, INSERT, UPDATE AND DELETE queries.
It also provides functions that can:
- Return the count of table records
- Get the last table record identifier that results from the last insert query
- The last query execution error
- The number of table rows affected by the last query
| by Boss Ibrahim Mussa package author 60 - 2 years ago (2022-12-30) Comment
Simple to use and simple to configure. Recommended for simple application.
Its based on PDO class configuration and support transaction, with a method that help you to convert to innodb engine to support transactions. |
B12 PHP FW: Manage database records with a PDO CRUD interface
This class can manage database records with a CRUD interface.
It provides classes that can connect to a database using PDO and perform queries to create, retrieve, update and delete records of a given table.
The package can display the Web interface to let users perform these operations with the possibility to customize the actions that access interface with application customization code.
| by Slavko Srakocic package author 65 - 2 years ago (2022-10-10) Comment
External URLs are not allowed in recommendations, i will try to cheat it :
Search web for "phporacle" to see newer code here :
https: github.com slavkoss fwphp tree master vendor b12php Db_allsites.php
Example to use Db_allsites.php (< 500 lines) is :
...tree master fwphp glomodul adrs (most simple)
or blog example :
...tree master fwphp glomodul blog - seems complicated but is not.
Although it is not elaborated enough, it gives a clear idea of what, in my opinion, the use of the PHP crud framework should look like. (Framework is for me code skeleton, code snippets for copy, paste). |
This class can connect to a database configured using a subclass.
It can connect to a given database supported by the PHP PDO extension using classes variables that an application can define using a sub-class of this class.
The class can also perform other database access actions forwarding calls to the PDO object, for instance:
- Preparing queries
- Setting query parameter values
- Executing queries
- Retrieve query results
| by Manuel Lemos 26695 - 2 years ago (2022-10-09) Comment
PDO itself is already a class. Anyway, try this package if you want a course that helps you to configure the connection to a MySQL server. |