{"id":13398230,"url":"https://github.com/catfan/Medoo","last_synced_at":"2025-03-14T02:30:50.645Z","repository":{"id":7747536,"uuid":"9114826","full_name":"catfan/Medoo","owner":"catfan","description":"The lightweight PHP database framework to accelerate the development.","archived":false,"fork":false,"pushed_at":"2024-10-11T03:15:09.000Z","size":475,"stargazers_count":4836,"open_issues_count":49,"forks_count":1149,"subscribers_count":210,"default_branch":"master","last_synced_at":"2024-10-29T10:24:21.251Z","etag":null,"topics":["composer","database","hacktoberfest","medoo","mssql","mysql","php","php-database-framework","php-framework","php-frameworks","sqlite"],"latest_commit_sha":null,"homepage":"https://medoo.in","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/catfan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"medoo","custom":["https://paypal.me/AngelaonLai"]}},"created_at":"2013-03-30T11:20:52.000Z","updated_at":"2024-10-29T05:44:29.000Z","dependencies_parsed_at":"2024-02-03T12:29:51.457Z","dependency_job_id":"2b29c126-1d7a-4fa6-a486-ca63843dee1a","html_url":"https://github.com/catfan/Medoo","commit_stats":{"total_commits":608,"total_committers":21,"mean_commits":"28.952380952380953","dds":0.3470394736842105,"last_synced_commit":"7775795b06b83727d5f78e27ca32033717091ccb"},"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catfan%2FMedoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catfan%2FMedoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catfan%2FMedoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catfan%2FMedoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catfan","download_url":"https://codeload.github.com/catfan/Medoo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243511592,"owners_count":20302578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","database","hacktoberfest","medoo","mssql","mysql","php","php-database-framework","php-framework","php-frameworks","sqlite"],"created_at":"2024-07-30T19:00:20.625Z","updated_at":"2025-03-14T02:30:50.600Z","avatar_url":"https://github.com/catfan.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://medoo.in\" target=\"_blank\"\u003e\u003cimg src=\"https://cloud.githubusercontent.com/assets/1467904/19835326/ca62bc36-9ebd-11e6-8b37-7240d76319cd.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/catfan/Medoo/actions\"\u003e\u003cimg alt=\"Build Status\" src=\"https://github.com/catfan/Medoo/actions/workflows/php.yml/badge.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/catfan/medoo\"\u003e\u003cimg alt=\"Total Downloads\" src=\"https://poser.pugx.org/catfan/medoo/downloads\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/catfan/medoo\"\u003e\u003cimg alt=\"Latest Stable Version\" src=\"https://poser.pugx.org/catfan/medoo/v/stable\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/catfan/medoo\"\u003e\u003cimg alt=\"License\" src=\"https://poser.pugx.org/catfan/medoo/license\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://opencollective.com/medoo\"\u003e\u003cimg alt=\"Backers on Open Collective\" src=\"https://opencollective.com/Medoo/backers/badge.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://opencollective.com/medoo\"\u003e\u003cimg alt=\"Sponsors on Open Collective\" src=\"https://opencollective.com/Medoo/sponsors/badge.svg\"\u003e \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e The lightweight PHP database framework to accelerate development.\n\n## Features\n\n* **Lightweight** - Portable with only one file.\n\n* **Easy** - Easy to learn and use, with a friendly construction.\n\n* **Powerful** - Supports various common and complex SQL queries, data mapping and prevents SQL injection.\n\n* **Compatible** - Supports MySQL, MSSQL, SQLite, MariaDB, PostgreSQL, Sybase, Oracle, and more.\n\n* **Friendly** - Works well with every PHP framework, such as Laravel, Codeigniter, Yii, Slim, and frameworks that support singleton extension or composer.\n\n* **Free** - Under the MIT license, you can use it anywhere, for whatever purpose.\n\n## Requirements\n\n- PHP 7.3+\n- Installed PDO extension\n\n## Get Started\n\n### Install via composer\n\nAdd Medoo to the `composer.json` configuration file.\n```bash\n$ composer require catfan/medoo\n```\n\nAnd update the composer\n```bash\n$ composer update\n```\n\n```php\n// Require Composer's autoloader.\nrequire 'vendor/autoload.php';\n\n// Use the Medoo namespace.\nuse Medoo\\Medoo;\n\n// Connect to the database.\n$database = new Medoo([\n    'type' =\u003e 'mysql',\n    'host' =\u003e 'localhost',\n    'database' =\u003e 'name',\n    'username' =\u003e 'your_username',\n    'password' =\u003e 'your_password'\n]);\n\n$database-\u003einsert('account', [\n    'user_name' =\u003e 'foo',\n    'email' =\u003e 'foo@bar.com'\n]);\n\n$data = $database-\u003eselect('account', [\n    'user_name',\n    'email'\n], [\n    'user_id' =\u003e 50\n]);\n\necho json_encode($data);\n\n// [{\n//    \"user_name\" : \"foo\",\n//    \"email\" : \"foo@bar.com\",\n// }]\n```\n\n## Contribution Guidelines\n\nBefore starting a new pull request, please ensure compatibility with other databases and write unit tests whenever possible.\n\nRun `phpunit tests` for unit testing and `php-cs-fixer fix` to fix code style.\n\nEach commit should start with a tag indicating the type of change: `[fix]`, `[feature]`, or `[update]`.\n\nPlease keep it simple and keep it clear.\n\n## License\n\nMedoo is released under the MIT license.\n\n## Links\n\n* Official website: [https://medoo.in](https://medoo.in)\n\n* Documentation: [https://medoo.in/doc](https://medoo.in/doc)\n\n* Twitter: [https://twitter.com/MedooPHP](https://twitter.com/MedooPHP)\n\n* Open Collective: [https://opencollective.com/medoo](https://opencollective.com/medoo)\n\n## Support Our Other Product\n[Gear Browser - Web Browser for Geek](https://gear4.app)\n\n[![Gear Browser](https://github.com/catfan/Medoo/assets/1467904/bc5059d4-6a2d-4bbf-90d9-a9f71bae3335)](https://gear4.app)","funding_links":["https://opencollective.com/medoo","https://paypal.me/AngelaonLai"],"categories":["PHP","\u003ca name=\"php-database\"\u003e\u003c/a\u003ePHP: Database ORM","数据库( Database )","类库"],"sub_categories":["数据库"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatfan%2FMedoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatfan%2FMedoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatfan%2FMedoo/lists"}