{"id":19503386,"url":"https://github.com/oops-org-php/mysql-extension-wrapper","last_synced_at":"2025-04-26T00:33:04.067Z","repository":{"id":45701138,"uuid":"49832410","full_name":"OOPS-ORG-PHP/mysql-extension-wrapper","owner":"OOPS-ORG-PHP","description":"Wrapper for mysql extension","archived":false,"fork":false,"pushed_at":"2024-04-12T18:07:37.000Z","size":47,"stargazers_count":18,"open_issues_count":0,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-13T09:47:11.370Z","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":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OOPS-ORG-PHP.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}},"created_at":"2016-01-17T19:39:49.000Z","updated_at":"2024-07-26T02:31:57.000Z","dependencies_parsed_at":"2024-11-10T22:21:13.372Z","dependency_job_id":"47e9b134-3f76-4007-9c6c-64c2a292de03","html_url":"https://github.com/OOPS-ORG-PHP/mysql-extension-wrapper","commit_stats":{"total_commits":27,"total_committers":4,"mean_commits":6.75,"dds":"0.11111111111111116","last_synced_commit":"b59a81afa7b4b21328ed041302f42e4ea60f919a"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OOPS-ORG-PHP%2Fmysql-extension-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OOPS-ORG-PHP%2Fmysql-extension-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OOPS-ORG-PHP%2Fmysql-extension-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OOPS-ORG-PHP%2Fmysql-extension-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OOPS-ORG-PHP","download_url":"https://codeload.github.com/OOPS-ORG-PHP/mysql-extension-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250917284,"owners_count":21507561,"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":[],"created_at":"2024-11-10T22:21:00.670Z","updated_at":"2025-04-26T00:33:03.856Z","avatar_url":"https://github.com/OOPS-ORG-PHP.png","language":"PHP","readme":"Wrapper for PHP mysql extension\n===============================\n[![GitHub license](https://img.shields.io/badge/license-BSD-blue.svg?style=plastic)](https://raw.githubusercontent.com/OOPS-ORG-PHP/mysql-extension-wrapper/master/LICENSE)\n\nThe mysql-wrapper api support mysql extension api, and was designed to work best as with mysql extension.\nIf you have PHP7 environment and must need mysql extension api, this is good choise.\n\n\n## License\nBSD 2-clause\n\n## Requirements\n\n1. This wrapper api requires mysqli extension on PHP 4.1 and after\n2. check with ***is_resource()*** about mysql link and mysql result, replace ***is_myresource()*** api. For example:\n```php\n    \u003c?php\n\n    # old code\n    $con = mysql_connect();\n    if ( ! is_resource($con) ) {\n        die (\"connect failed\\n\");\n    }\n\n    # wrapper code\n    $con = mysql_connect();\n    if ( ! is_myresource($con) ) {\n        die (\"connect filed\\n\");\n    }\n    ?\u003e\n```\n\n## Example\n```php\n\u003c?php\n# even if loaded mysql extension, well done.\nrequire_once 'mysql-wrapper.php';\n\n$con = @mysql_connect ('localhost', 'user', 'pass');\nif ( ! is_myresource ($con) ) {\n\ttrigger_error(sprintf('Connect error: %s', mysql_error()), E_USER_ERROR);\n\texit;\n}\n\nmysql_select_db('mysql', $con);\nmysql_set_charset ('utf8', $con);\n\n$result = mysql_query ('SELECT * FROM user', $con);\nif ( ! is_myresource($result) ) {\n\ttrigger_error(sprintf('Query Error: %s', mysql_error()), E_USER_WARNING);\n}\n\n$rno = mysql_num_rows($result);\n\nwhile ( ($row = mysql_fetch_object($result)) ) {\n\tprintf(\"User: %s, Host: %s\\n\", $row-\u003euser, $row-\u003ehost);\n}\n\nmysql_free_result($result);\nmysql_close($con);\n\n?\u003e\n```\n\n## Composer\n\nfirst, make composer.json as follow:\n```json\n{\n    \"require\": {\n        \"joungkyun/mysql-extension-wrapper\": \"1.0.*\"\n    }\n}\n```\n\nand, install ***mysql-extension-wrapper***\n\n```bash\n[user@host project]$ php composer.phpt install\nLoading composer repositories with package information\nUpdating dependencies (including require-dev)\nPackage operations: 1 install, 0 updates, 0 removals\n  - Installing joungkyun/mysql-extension-wrapper (1.0.1): Downloading (100%)\nWriting lock file\nGenerating autoload files\n[user@host project]$\n```\n\nand, write code as follow:\n\n```php\n\u003c?php\nrequire_once 'vendor/autoload.php';\n\necho 'mysql_connect is supported ';\nif ( function_exists('mysql_connect') )\n    echo 'YES';\nelse\n    echo 'NO';\n\necho \"\\n\";\n?\u003e\n```\n\n\n## Credits\nJoungKyun.Kim\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foops-org-php%2Fmysql-extension-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foops-org-php%2Fmysql-extension-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foops-org-php%2Fmysql-extension-wrapper/lists"}