{"id":21984944,"url":"https://github.com/interlab/smf-cool-db","last_synced_at":"2026-05-10T16:03:35.870Z","repository":{"id":12662051,"uuid":"15333894","full_name":"interlab/smf-cool-db","owner":"interlab","description":"new db style for smf 2.xx","archived":false,"fork":false,"pushed_at":"2014-03-25T16:15:29.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T01:45:36.136Z","etag":null,"topics":[],"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/interlab.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}},"created_at":"2013-12-20T08:48:48.000Z","updated_at":"2015-04-02T08:21:48.000Z","dependencies_parsed_at":"2022-09-19T06:30:40.607Z","dependency_job_id":null,"html_url":"https://github.com/interlab/smf-cool-db","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/interlab/smf-cool-db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlab%2Fsmf-cool-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlab%2Fsmf-cool-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlab%2Fsmf-cool-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlab%2Fsmf-cool-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interlab","download_url":"https://codeload.github.com/interlab/smf-cool-db/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlab%2Fsmf-cool-db/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273666013,"owners_count":25146275,"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-09-04T02:00:08.968Z","response_time":61,"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":[],"created_at":"2024-11-29T18:11:59.749Z","updated_at":"2026-05-10T16:03:30.844Z","avatar_url":"https://github.com/interlab.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"cool-db-smf\n===========\n\nnew db style for smf 2.xx\n\n## Example ##\n\n**old style**\n```php\nglobal $smcFunc;\n\n$request = $smcFunc['db_query']('', '\n    SELECT id_cat, cat_order\n    FROM {db_prefix}categories',\n    []\n);\nif ($smcFunc['db_num_rows']($request) == 0)\n    return [];\nwhile ($row = $smcFunc['db_fetch_assoc']($request))\n{\n    # ...\n    $cat_order[$row['id_cat']] = $row['cat_order'];\n}\n$smcFunc['db_free_result']($request);\n```\n\n**new style**\n```php\nuse Inter\\DB;\n\n$request = DB::query('\n    SELECT id_cat, cat_order\n    FROM {db_prefix}categories',\n    []\n);\nif (!$request-\u003enum_rows)\n    return [];\nwhile ($row = $request-\u003efetch_assoc)\n{\n    # ...\n    $cat_order[$row['id_cat']] = $row['cat_order'];\n}\n$request-\u003efree;\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterlab%2Fsmf-cool-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterlab%2Fsmf-cool-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterlab%2Fsmf-cool-db/lists"}