{"id":33974877,"url":"https://github.com/phppackage/pdo-wrapper","last_synced_at":"2026-05-27T18:03:45.581Z","repository":{"id":57040741,"uuid":"120492220","full_name":"phppackage/pdo-wrapper","owner":"phppackage","description":"Yet another PDO wrapper which extends the PDO class and adds some additional suger.","archived":false,"fork":false,"pushed_at":"2018-02-07T10:10:45.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-14T14:34:48.348Z","etag":null,"topics":["composer-package","pdo","wrapper","yet-another"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phppackage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-06T16:56:56.000Z","updated_at":"2018-06-13T20:10:28.000Z","dependencies_parsed_at":"2022-08-23T22:00:13.238Z","dependency_job_id":null,"html_url":"https://github.com/phppackage/pdo-wrapper","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/phppackage/pdo-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phppackage%2Fpdo-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phppackage%2Fpdo-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phppackage%2Fpdo-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phppackage%2Fpdo-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phppackage","download_url":"https://codeload.github.com/phppackage/pdo-wrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phppackage%2Fpdo-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33577645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer-package","pdo","wrapper","yet-another"],"created_at":"2025-12-13T01:54:48.718Z","updated_at":"2026-05-27T18:03:45.557Z","avatar_url":"https://github.com/phppackage.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PDO Wrapper\n\n[![Build Status](https://travis-ci.org/phppackage/pdo-wrapper.svg?branch=master)](https://travis-ci.org/phppackage/pdo-wrapper)\n[![StyleCI](https://styleci.io/repos/120492220/shield?branch=master)](https://styleci.io/repos/120492220)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/phppackage/pdo-wrapper/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/phppackage/pdo-wrapper/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/phppackage/pdo-wrapper/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/phppackage/pdo-wrapper/code-structure/master/code-coverage)\n[![Packagist Version](https://img.shields.io/packagist/v/phppackage/pdo-wrapper.svg?style=flat-square)](https://github.com/phppackage/pdo-wrapper/releases)\n[![Packagist Downloads](https://img.shields.io/packagist/dt/phppackage/pdo-wrapper.svg?style=flat-square)](https://packagist.org/packages/phppackage/pdo-wrapper)\n\nYet another PDO wrapper which extends the PDO class and adds some additional suger.\n\n## Install\n\nRequire this package with composer using the following command:\n\n``` bash\n$ composer require phppackage/pdo-wrapper\n```\n\n### Usage example:\n\n    \u003c?php\n    require 'vendor/autoload.php';\n    \n    use PHPPackage\\PDOWrapper\\PDO;\n\n    // connect, a standard PDO constructor\n    $db = new PDO(\n        'sqlite::memory:',\n        'test_username',\n        'test_password', \n        [\n            PDO::ATTR_ERRMODE =\u003e PDO::ERRMODE_EXCEPTION\n        ]\n    );\n    \n    // or default to an sqlite file\n    $db = new PDO();\n    \n    // get database info\n    $info = $pdo-\u003einfo();\n    \n    // get databases\n    $databases = $pdo-\u003edatabases();\n    \n    // get tables\n    $tables = $pdo-\u003etables();\n    \n    // create a database\n    $pdo-\u003ecreateDatabase('test');\n    \n    // get database name (from dsn)\n    $name = $pdo-\u003egetDatabaseName();\n    \n    // export database (mysql only)\n    $filename = $pdo-\u003eexport('./'); // ./ = destination folder\n    \n    // import database (mysql only)\n    $pdo-\u003eimport('./backup.sql.gz');\n    \n    // create\n    $pdo-\u003erun('INSERT INTO table_name (name) VALUES (?)', ['foo']);\n    \n    // create - multi\n    $pdo-\u003erun('INSERT INTO table_name (name) VALUES (?)', [['foo'], ['bar'], ['baz']]);\n\n    // retrieve - PDOStatement\n    $stmt = $pdo-\u003erun('SELECT * FROM table_name');\n    $stmt = $pdo-\u003erun('SELECT * FROM table_name WHERE id = ?', [1]);\n    $stmt = $pdo-\u003erun('SELECT * FROM table_name WHERE id = :id', ['id' =\u003e 1]);\n\n    // retrieve - single row\n    $result = $pdo-\u003erow('SELECT * FROM table_name WHERE id = ?', [1]);\n    $result = $pdo-\u003erow('SELECT * FROM table_name WHERE id = :id', ['id' =\u003e 1]);\n    \n    // retrieve - single cell\n    $result = $pdo-\u003ecell('SELECT column FROM table_name WHERE id = ?', [1]);\n    $result = $pdo-\u003ecell('SELECT column FROM table_name WHERE id = :id', ['id' =\u003e 1]);\n    \n    // retrieve - all array\n    $result = $pdo-\u003eall('SELECT * FROM table_name');\n    $result = $pdo-\u003eall('SELECT * FROM table_name WHERE id = ?', [1]);\n    $result = $pdo-\u003eall('SELECT * FROM table_name WHERE id = :id', ['id' =\u003e 1]);\n    \n    // update\n    $pdo-\u003erun('UPDATE table_name SET column = ? WHERE id = ?', ['foo', 1]);\n    \n    // delete\n    $pdo-\u003erun('DELETE FROM table_name WHERE id = ?', [1]);\n    \n    // .. and all other standard PDO functionality\n\n## Testing\n\n``` bash\n$ composer test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n\n## Credits\n\n - [Lawrence Cherone](http://github.com/lcherone)\n - [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphppackage%2Fpdo-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphppackage%2Fpdo-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphppackage%2Fpdo-wrapper/lists"}