Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (2) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2014-07-05 (2 years ago) | Not yet rated by the users | Total: 301 This week: 1 | All time: 6,977 This week: 1,047 |
Version | License | PHP version | Categories | |||
pdo-wrapper 1.0 | Freely Distributable | 5.0 | PHP 5, Databases |
Description | Author | |||||||||||||
This class can access MySQL databases using PDO. |
|
Note: Anything within square brackets ([*]) is not required by default Note: encode and decode functions are pretty much useless in any kind of production environment. Connection initiation: $mysql = new Database('127.0.0.1', 'pdoUser', 'userPass' [, 'dbName']); Set the database if not provided earlier: $mysql->setDB('dbName'); Insert info into a table: $mysql->insert('table_name', array('column_1' => 'info_1' [, 'col2' => 'info2'])); Execute a query: $mysql->query('update `lolcats` set `name`=:new where `name`=:old', array('new' => 'sweety', 'old' => 'cuteie')); Execute a query, returning the rows selected: $v = $mysql->fetch_array('select * from `users` where `username`=:user;', array('user' => 'Frankie\'s Dog')); Hashing: $hash = Database::hash('password'); if(Database::validate('password', $hash)) { // Yippee you logged in ^.^ } |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.