{"id":16467261,"url":"https://github.com/irfaardy/simple-db-framework","last_synced_at":"2026-04-11T02:05:46.970Z","repository":{"id":129681096,"uuid":"219493054","full_name":"irfaardy/simple-db-framework","owner":"irfaardy","description":" 📙simple php db Framework","archived":false,"fork":false,"pushed_at":"2020-04-27T07:22:55.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-15T18:59:24.076Z","etag":null,"topics":["autoloader","database","database-framework","db-operations","irfa","lightweight","mysql","pdo","pgsql","php","simple"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/irfaardy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-11-04T12:10:31.000Z","updated_at":"2021-10-24T20:29:41.000Z","dependencies_parsed_at":"2023-07-09T19:45:25.466Z","dependency_job_id":null,"html_url":"https://github.com/irfaardy/simple-db-framework","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/irfaardy/simple-db-framework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irfaardy%2Fsimple-db-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irfaardy%2Fsimple-db-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irfaardy%2Fsimple-db-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irfaardy%2Fsimple-db-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irfaardy","download_url":"https://codeload.github.com/irfaardy/simple-db-framework/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irfaardy%2Fsimple-db-framework/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269730601,"owners_count":24466058,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"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":["autoloader","database","database-framework","db-operations","irfa","lightweight","mysql","pdo","pgsql","php","simple"],"created_at":"2024-10-11T11:46:48.258Z","updated_at":"2026-04-11T02:05:46.922Z","avatar_url":"https://github.com/irfaardy.png","language":"PHP","readme":"# Simple DB Operation Framework with PHP\n\n**Configuration**\n\nConfig file :  Irfa/config/database.php\n\n```php\n\u003c?php\n$config = [\n    'DB_host' =\u003e 'localhost',\n    'DB_name' =\u003e 'database_name',\n    'DB_username' =\u003e 'yourusername',\n    'DB_password' =\u003e 'yourpassword',\n    'DB_port' =\u003e '3306',\n    'DB_driver' =\u003e 'mysql',\n   ];\n```\n\n**\u003ch2\u003eBasic Usage\u003c/h2\u003e**\n**Fetch all rows**\n\n\n```php\n  \u003c?php\n    require 'Autoloader.php';\n    use Irfa\\DBOperation as DB;\n    \n    $res = DB::table('book')-\u003eget();\n     foreach ($res as $r):\n        echo $r['title'].\"\u003cbr\u003e\";\n      endforeach;\n```\n\n**Fetch Single row**\n\n \n\n```php\n  $data= DB::table('book')\n    \t-\u003ewhere(['book_id' =\u003e 'ABC123'])\n    \t-\u003efirst();\n    \t\n    \techo $data['title'];\n```\n\n**Select specific column**\n\n```php\n  $data= DB::table('book')\n        -\u003eselect(['book_id','title','synopsis'])\n    \t-\u003ewhere(['book_id' =\u003e 'ABC123'])\n    \t-\u003efirst();\n    \t\n    \techo $r['book_id'].' '.$data['title'].' '.$r['author'];\n```\n\n**Order by**\n\n \n\n```php\n$res = DB::table('book')-\u003eorderBy('author','DESC')-\u003eget();\n         foreach ($res as $r):\n            echo $r['title'].\"\u003cbr\u003e\";\n          endforeach;\n```\n\n  **Insert Data**\n\n\n```php\n  $params = ['title'=\u003e'Lorem', 'author' =\u003e 'Ipsum'];\n  DB::table('book')-\u003einsert($params);\n```\n\n **Update data**\n\n\n```php\n$params = ['title'=\u003e'Ipsum', 'author' =\u003e 'Lorem'];\nDB::table('book')\n-\u003ewhere(['book_id' =\u003e 'ABC123'])\n-\u003eupdate($params);\n```\n\n**Delete data**\n\n```php\nDB::table('book')\n\t-\u003ewhere(['book_id' =\u003e 'ABC123'])\n\t-\u003edelete();\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firfaardy%2Fsimple-db-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firfaardy%2Fsimple-db-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firfaardy%2Fsimple-db-framework/lists"}