{"id":18714026,"url":"https://github.com/xi-plus/sql-function","last_synced_at":"2025-07-01T03:41:56.116Z","repository":{"id":87553332,"uuid":"43136639","full_name":"Xi-Plus/SQL-function","owner":"Xi-Plus","description":"SQL function in PHP","archived":false,"fork":false,"pushed_at":"2023-01-15T12:40:27.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T09:18:57.375Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xi-Plus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2015-09-25T11:39:17.000Z","updated_at":"2023-01-15T12:07:43.000Z","dependencies_parsed_at":"2023-03-13T18:44:18.795Z","dependency_job_id":null,"html_url":"https://github.com/Xi-Plus/SQL-function","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/Xi-Plus%2FSQL-function","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xi-Plus%2FSQL-function/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xi-Plus%2FSQL-function/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xi-Plus%2FSQL-function/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xi-Plus","download_url":"https://codeload.github.com/Xi-Plus/SQL-function/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239576790,"owners_count":19662114,"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-07T12:50:57.325Z","updated_at":"2025-02-19T01:15:29.897Z","avatar_url":"https://github.com/Xi-Plus.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SQL-function\n\n## How To Use\n\n### Preset\n```\ndbname : Defined in db.php\ncolumn : *\norder : ASC\nlimit : No limit\n```\n\n### SELECT\n\n```PHP\n$query = new query;\n$query-\u003edbname = 'dbname';\n$query-\u003etable = 'table';\n$query-\u003ecolumn = array('column');\n$query-\u003ewhere = array(\n\tarray('column','value','operator')\n);\n$query-\u003eorder = array(\n\tarray('column1','DESC'),\n\tarray('column2')\n);\n$query-\u003egroup = array('column');\n$query-\u003e$limit = array(0,10);\n$row = SELECT($query);\n```\n\n### SELECT one line\n```PHP\n...\n$row = fetchone(SELECT($query));\n```\n\n### INSERT\n```PHP\n$query = new query;\n$query-\u003edbname = 'dbname';\n$query-\u003etable = 'table';\n$query-\u003evalue = array(\n\tarray('column','value')\n);\nINSERT($query);\n```\n\n### UPDATE\n```PHP\n$query = new query;\n$query-\u003edbname = 'dbname';\n$query-\u003etable = 'table';\n$query-\u003evalue = array(\n\tarray('column','value')\n);\n$query-\u003ewhere = array(\n\tarray('column','value','operator')\n);\n$query-\u003e$limit = array(0,10);\nUPDATE($query);\n```\n\n### DELETE\n```PHP\n$query = new query;\n$query-\u003edbname = 'dbname';\n$query-\u003etable = 'table';\n$query-\u003ewhere = array(\n\tarray('column','value','operator')\n);\n$query-\u003e$limit = array(0,10);\nDELETE($query);\n```\n\n### SQL\n```PHP\n$query = new query;\n$query-\u003edbname = 'dbname';\n$query-\u003etable = 'table';\n$query-\u003equery = \"SQL string\";\nSQL($query);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxi-plus%2Fsql-function","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxi-plus%2Fsql-function","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxi-plus%2Fsql-function/lists"}