{"id":23984541,"url":"https://github.com/mastro-elfo/mydb","last_synced_at":"2026-04-13T21:32:09.110Z","repository":{"id":69311955,"uuid":"92747553","full_name":"mastro-elfo/MYDB","owner":"mastro-elfo","description":"PHP class to manage mysqli DB","archived":false,"fork":false,"pushed_at":"2017-09-04T15:00:47.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-24T09:16:51.930Z","etag":null,"topics":["database","mysqli","php"],"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/mastro-elfo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2017-05-29T14:29:21.000Z","updated_at":"2017-06-09T09:14:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"83b4adac-47d9-4e17-9f82-01fdc428899a","html_url":"https://github.com/mastro-elfo/MYDB","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/mastro-elfo/MYDB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastro-elfo%2FMYDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastro-elfo%2FMYDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastro-elfo%2FMYDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastro-elfo%2FMYDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mastro-elfo","download_url":"https://codeload.github.com/mastro-elfo/MYDB/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastro-elfo%2FMYDB/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31771819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: 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":["database","mysqli","php"],"created_at":"2025-01-07T13:18:27.033Z","updated_at":"2026-04-13T21:32:09.081Z","avatar_url":"https://github.com/mastro-elfo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MYDB\nSee also comments in code.\n\n## MYDB::last_query\nThe last executed query.\n\n## MYDB::query\nSends a generic query. Also saves the query string to `$this-\u003elast_query`.\n\n### Params\n* string `$query` The query string\n\n### Return\nReturns `false` on failure. For successful SELECT, SHOW, DESCRIBE or EXPLAIN queries will return a `mysqli_result` object. For other successful queries will return `true`. See also [http://php.net/manual/en/mysqli.query.php](http://php.net/manual/en/mysqli.query.php).\n\n## MYDB::insert\nCreates and sends an 'INSERT INTO' query.\n\n### Params\n* string `$table` The table name\n* array\t`$data` Associative array. Keys are field names, Values are field values.\n\n### Return\nThe last insert id on success, 0 on failure\n\n### Example\n\n```php\n$db-\u003einsert('Table', [\n\t'Field1' =\u003e 'Value1',\n\t'Field2' =\u003e 'Value2'\n]);\n```\n\n## MYDB::replace\nCreates and sends a 'REPLACE INTO' query\n\n### Params\n* string `$table` Table name\n* array `$data` Associative array. Keys are field names, Values are field values.\n\n### Return\nThe last insert id on success, 0 on failure\n\n## MYDB::update\nCreates and sends an 'UPDATE' query.\n\n### Params\n* string `$table` The table name\n* array `$data` Associative array. Keys are field names, Values are field values.\n* array `$where` WHERE clause. Items are joined with AND.\n\n### Return\n`true` on success, `false` on failure\n\n## MYDB::upsert\nCreate and sends an 'INSERT INTO' query. On duplicate key sends an 'UPDATE' query. \n\n### Params\n* string `$table` The table name\n* array `$data` Associative array. Keys are field names, Values are field values.\n* array `$where` WHERE clause. This became part of `$data` in the 'INSERT INTO' query, and a real WHERE clause in the 'UPDATE' query.\n\n### Return\nReturns `false` on failure. For successful SELECT, SHOW, DESCRIBE or EXPLAIN queries will return a `mysqli_result` object. For other successful queries will return `true`. See also [http://php.net/manual/en/mysqli.query.php](http://php.net/manual/en/mysqli.query.php).\n\n## MYDB::select\nCreate and sends a 'SELECT' query.\n\n### Params\n* string `$table` Table name\n* mixed `$fields` array of fields names or `'*'` for all\n* array `$where`  WHERE clause. Items are joined with AND.\n* array `$orderby` ORDER BY clause. `[field_name =\u003e 'ASC|DESC', ...]`\n* mixed `$limit` LIMIT clause. Use one number to limit results number or two comma separated numbers for paging.\n\n### Return\nFor successful queries return a `mysqli_result` object. Returns `false` on failure.\n\n## MYDB::delete\nCreates and sends a 'DELETE' query.\n\n### Params\n* string `$table` Table name\n* array `$where`  WHERE clause. Items are joined with AND.\n\n### Return\n`true` on success, `false` on failure","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastro-elfo%2Fmydb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmastro-elfo%2Fmydb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastro-elfo%2Fmydb/lists"}