Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2022-10-21 (23 days ago) | | Not enough user ratings | | Total: 399 This week: 7 | | All time: 6,530 This week: 106 |
|
Description | | Author |
This package can connect to databases using PDO or MySQLi.
It provides two classes: one to connect to a database using PDO and another to connect to MySQL using MySQLi.
Both classes can execute prepared queries from parameters and return the results in arrays. Recommendations PDO Class I need a class to connect to my db (mysql). Now my code is a old
| |
|
Details
Connection Instruction
This package have classes to connection and queries for Database Management System (DBMS [or SGBD, in Portuguese]).
Currently it can connect to a database using MySQLi or PDO extension and execute several types of queries from parameters that define tables, fields, values and conditions.
Folder:
-
/php/connection/MysqliInstruction.php `MysqliInstruction()`
-
/php/connection/PDOInstruction.php `PDOInstruction()`
Example
MysqliInstruction()
/Autoload Include/
use \Connection\MysqliInstruction;
$mysqli = new MysqliInstruction();
$mysqli->connect();
$resp = $mysqli->select('SELECT * FROM table WHERE id < ?', array('10'));
$resp = $mysqli->generic('DELETE FROM table WHERE id = ?', array('2'));
var_dump($resp);
$mysqli->end();
PDOInstruction()
/Autoload Include/
use \Connection\PDOInstruction;
$pdo = new PDOInstruction();
$pdo->connect();
$resp = $pdo->select('SELECT * FROM table WHERE id < ?', array('10'));
$resp = $pdo->generic('DELETE FROM table WHERE id = ?', array('2'));
var_dump($resp);
$pdo->end();
Also look ~
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.