{"id":15686940,"url":"https://github.com/dcblogdev/sql-import","last_synced_at":"2025-05-07T17:12:17.030Z","repository":{"id":56963229,"uuid":"142712626","full_name":"dcblogdev/sql-import","owner":"dcblogdev","description":"PDO import sql from a .sql file","archived":false,"fork":false,"pushed_at":"2023-03-25T00:12:20.000Z","size":24,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-07T17:12:06.365Z","etag":null,"topics":["hacktoberfest","importer","php","sql"],"latest_commit_sha":null,"homepage":"","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/dcblogdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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},"funding":{"github":["dcblogdev"]}},"created_at":"2018-07-28T21:55:18.000Z","updated_at":"2024-11-13T20:33:54.000Z","dependencies_parsed_at":"2024-10-23T20:36:00.399Z","dependency_job_id":"9055a643-5881-423a-b4c2-47a078e4d6ae","html_url":"https://github.com/dcblogdev/sql-import","commit_stats":{"total_commits":26,"total_committers":3,"mean_commits":8.666666666666666,"dds":"0.34615384615384615","last_synced_commit":"80b2711e17693d95ad31d8135b86a57591165afb"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcblogdev%2Fsql-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcblogdev%2Fsql-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcblogdev%2Fsql-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcblogdev%2Fsql-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcblogdev","download_url":"https://codeload.github.com/dcblogdev/sql-import/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252922346,"owners_count":21825639,"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":["hacktoberfest","importer","php","sql"],"created_at":"2024-10-03T17:42:02.941Z","updated_at":"2025-05-07T17:12:16.990Z","avatar_url":"https://github.com/dcblogdev.png","language":"PHP","readme":"# php Import SQL\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/dcblogdev/sql-import.svg?style=flat-square)](https://packagist.org/packages/dcblogdev/sql-import)\n[![Total Downloads](https://img.shields.io/packagist/dt/dcblogdev/sql-import.svg?style=flat-square)](https://packagist.org/packages/dcblogdev/sql-import)\n\n![Logo](https://repository-images.githubusercontent.com/142712626/d110ff80-49c1-11eb-8153-e43e3960caca)\n\nPDO import sql from a .sql file\n\n## Install\nUsing composer include the repository by typing the following into a terminal\n\n```\ncomposer require dcblogdev/sql-import\n```\n\n## Usage\n\nInclude the composer autoloader, import the Import namespace.\n\nDefine your database file path and credentials, the option dropTables, when set to true, will delete all the tables in the database before the sql file gets imported.\n\nThe option forceDropTables is optional and not recommended. When enabled together with dropTables, the deletion of tables will be executed with disabled foreign key checks. Only use this method if you are sure that the integrity of the existing data in the database does not matter.\n\n```php\nuse Dcblogdev\\SqlImport\\Import;\n\n$filename = 'database.sql';\n$username = 'root';\n$password = '';\n$database = 'sampleproject';\n$host = 'dev';\n$dropTables = true;\n$forceDropTables = false;\n\nnew Import($filename, $username, $password, $database, $host, $dropTables, $forceDropTables);\n```\n","funding_links":["https://github.com/sponsors/dcblogdev"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcblogdev%2Fsql-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcblogdev%2Fsql-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcblogdev%2Fsql-import/lists"}