{"id":15286464,"url":"https://github.com/josecelano/phpsql","last_synced_at":"2026-01-05T02:48:49.706Z","repository":{"id":57001661,"uuid":"115154062","full_name":"josecelano/phpsql","owner":"josecelano","description":"PHP multi database console client","archived":false,"fork":false,"pushed_at":"2017-12-22T22:29:47.000Z","size":17,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T00:13:47.340Z","etag":null,"topics":["console","database","mssql","myssql","php","sql"],"latest_commit_sha":null,"homepage":null,"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/josecelano.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-12-22T22:20:17.000Z","updated_at":"2018-01-08T07:41:19.000Z","dependencies_parsed_at":"2022-08-21T12:10:13.439Z","dependency_job_id":null,"html_url":"https://github.com/josecelano/phpsql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josecelano%2Fphpsql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josecelano%2Fphpsql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josecelano%2Fphpsql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josecelano%2Fphpsql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josecelano","download_url":"https://codeload.github.com/josecelano/phpsql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245170043,"owners_count":20571998,"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":["console","database","mssql","myssql","php","sql"],"created_at":"2024-09-30T15:14:26.118Z","updated_at":"2026-01-05T02:48:49.667Z","avatar_url":"https://github.com/josecelano.png","language":"PHP","readme":"# PHP multi database console client\n\nI needed a SQL Server console client on a Linux system and I found this one:\n\nhttps://github.com/hasankhan/sql-cli\n\nand I decided to do the same for PHP.\n\n## Install\n\n```\ngit clone git@github.com:josecelano/phpsql.git\ncd phpsql\n```\n\nYou can use it in 3 different ways:\n\n## SQL as argument\n\n```\nbin/phpsql --user=root --password= --database=homestead --host=127.0.0.1 --port=3306 \"show tables\"\n```\n\n## Standard input (pipe)\n\n```\necho \"show tables\" | bin/phpsql  --user=root --password= --database=homestead --host=127.0.0.1 --port=3306\n```\n\n## Interactive shell\n\n```\nbin/phpsql --interactive --user=root --password= --database=homestead --host=127.0.0.1 --port=3306\n```\n\n## Test\n\n```\ncomposer test\n```\n\n## TODO\n\n* I had to add the `--interactive` option. Ideally interactive mode should be automatically executed if there are no data from the standard input.\n\n## Output\n\nOutput should be something like:\n\n```\nC:\\Projects\\phpsql (master)\nλ bin\\phpsql.bat --interactive --user=root --password= --database=homestead --host=127.0.0.1 --port=3306\nWelcome to interactive php SQL shell. Type 'quit' or 'exit' to exit.\n\u003eshow tables\n+-------------------------+\n| Tables_in_homestead     |\n+-------------------------+\n| appliances              |\n| history                 |\n| history_types           |\n| migrations              |\n| password_resets         |\n| permission_role         |\n| permissions             |\n| role_user               |\n| roles                   |\n| sessions                |\n| social_logins           |\n| users                   |\n| wishlist_item_feedbacks |\n| wishlists               |\n+-------------------------+\n\u003e\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosecelano%2Fphpsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosecelano%2Fphpsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosecelano%2Fphpsql/lists"}