{"id":15295834,"url":"https://github.com/mbah-dhaim/libcsi","last_synced_at":"2026-05-18T10:11:01.316Z","repository":{"id":62517018,"uuid":"101286538","full_name":"mbah-dhaim/libcsi","owner":"mbah-dhaim","description":"simple database and query builder library","archived":false,"fork":false,"pushed_at":"2017-09-05T22:29:24.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-29T17:54:32.666Z","etag":null,"topics":["model","mysql-database","pdo","php"],"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/mbah-dhaim.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}},"created_at":"2017-08-24T11:12:40.000Z","updated_at":"2017-08-24T14:08:33.000Z","dependencies_parsed_at":"2022-11-02T13:45:40.227Z","dependency_job_id":null,"html_url":"https://github.com/mbah-dhaim/libcsi","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mbah-dhaim/libcsi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbah-dhaim%2Flibcsi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbah-dhaim%2Flibcsi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbah-dhaim%2Flibcsi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbah-dhaim%2Flibcsi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbah-dhaim","download_url":"https://codeload.github.com/mbah-dhaim/libcsi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbah-dhaim%2Flibcsi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33174091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["model","mysql-database","pdo","php"],"created_at":"2024-09-30T18:08:21.088Z","updated_at":"2026-05-18T10:11:01.294Z","avatar_url":"https://github.com/mbah-dhaim.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libcsi\n  \nSimple library for connecting database and create query builder model  \nversion **dev-master**  \n* only support **mysql/mariadb** syntax\n\n## installatation\n  \nIt's recommended that you use [Composer](https://getcomposer.org/) to install  \n```bash  \n$ composer require libcsi/libcsi \"dev-master\"  \n```  \n\n**OR**\n\n* create composer.json containing  \n```javascript  \n{\n\t\"minimum-stability\": \"dev\",\n\t\"require\": {\n\t\t\"php\": \"\u003e=5.3.0\",\n\t\t\"libcsi/libcsi\": \"dev-master\"\n\t}\n}\n```\n* run `composer install`  \n  \n## usage example\n  \n```php\n\u003c?php\n  \nrequire_once 'vendor/autoload.php';\n\n// put it somewhere you like  \n$config = array (\n\t\t'DB' =\u003e array (\n\t\t\t\t'dbdriver' =\u003e 'mysql',\n\t\t\t\t'dbserver' =\u003e 'localhost',\n\t\t\t\t'dbname' =\u003e 'dbname',\n\t\t\t\t'dbuser' =\u003e 'dbuser',\n\t\t\t\t'dbpass' =\u003e 'dbpass'\n\t\t)\n);\n$db = new \\CSI\\Data\\DataAdapter ( $config [\"DB\"] );\ntry{\n\t// connect to database\n\t$db-\u003econnect();\n}catch(\\Exception $e){\n\tdie($e-\u003egetMessage());\n}\n```    \n  \n### example model\n  \n```php\n\u003c?php\n\nfinal class TableTest extends \\CSI\\Data\\Model {\n\t// name of the table in database\n\tprotected $table=\"table_test\";\n\t// name of primary key of this table\n\tprotected $primaryKey=\"id\";\n}\n```\n  \n#### fetching data using model\n\n```php\n$table = new TableTest();  \n$table-\u003efind(\"a primary key value\");  \n$fieldvalue = $table-\u003eafiedname;\n```\n  \nThat's it\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbah-dhaim%2Flibcsi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbah-dhaim%2Flibcsi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbah-dhaim%2Flibcsi/lists"}