{"id":21851649,"url":"https://github.com/yhyasyrian/sydb","last_synced_at":"2026-05-09T05:32:22.684Z","repository":{"id":46734341,"uuid":"515269829","full_name":"yhyasyrian/SyDb","owner":"yhyasyrian","description":"Library communication and dealing with databases","archived":false,"fork":false,"pushed_at":"2023-11-18T16:00:30.000Z","size":76,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-12T23:04:46.186Z","etag":null,"topics":["database","mysqli","php","php-mysql","php-sql","sql","sydb"],"latest_commit_sha":null,"homepage":"","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/yhyasyrian.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,"governance":null}},"created_at":"2022-07-18T16:56:22.000Z","updated_at":"2023-09-22T16:32:41.000Z","dependencies_parsed_at":"2022-07-25T00:46:18.721Z","dependency_job_id":"3f4ec6a6-6f83-46f0-8da9-752b79f866a4","html_url":"https://github.com/yhyasyrian/SyDb","commit_stats":{"total_commits":41,"total_committers":1,"mean_commits":41.0,"dds":0.0,"last_synced_commit":"567e1c247cf83df561e9f31bfc36f32708ef675e"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/yhyasyrian/SyDb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhyasyrian%2FSyDb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhyasyrian%2FSyDb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhyasyrian%2FSyDb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhyasyrian%2FSyDb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yhyasyrian","download_url":"https://codeload.github.com/yhyasyrian/SyDb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhyasyrian%2FSyDb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279036126,"owners_count":26089823,"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-10-15T02:00:07.814Z","response_time":56,"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":["database","mysqli","php","php-mysql","php-sql","sql","sydb"],"created_at":"2024-11-28T01:09:09.096Z","updated_at":"2025-10-15T02:33:13.316Z","avatar_url":"https://github.com/yhyasyrian.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SyDb\r\nSyrian DataBase\r\nIt is a simple library that depends on connecting to databases via mysql that performs data processing, as it converts ordinary data into `sql` code.\r\nThe library is safe and does not contain `sql injection` vulnerabilities. It is intended to avoid these problems, which may be somewhat difficult for beginners to avoid, and it is easy and flexible to learn.\r\n\r\n## Note\r\nThis library was just an experiment and does not have the ability for large and medium projects because of the lack of the ability to merge tables through methods embedded in it, it is useful to add and delete data only and in the end it was just an experience for me and I learned a lot from it and today I do not advise anyone to deal with it\r\n\r\nIndex A sequential list of methods:\r\n[Install Library](#install-library) How to install library SyDb\r\n[Select Data](#select) Get data from the database\r\n[Insert Data](#insert) Set data from the database\r\n[Update Data](#update) Update data from the database\r\n[Delete Data](#delete) Delete data from the database\r\n[Query SQL](#query) Run SQL code\r\n[Connect DataBase](#connect) New connect database\r\n[Close Connect DataBase](#close) Close the connect present\r\n[Table](#table) Table properties\r\n[Error](#error) Error Exception\r\nSome future:\r\n* [Add data where](#addwhere)\r\n* [Starting column](#startcolumn)\r\n* [Ending column](#endcolumn)\r\n* [Allocate contact time](#settimeconnect)\r\n# install-Library\r\nYou can install library with `composer` You can install a library using Composer which is the best way to download SyDb by adding the following line to `composer.json` file:\r\n```json\r\n{\r\n    \"require\": {\r\n        \"yhyasyrian/sydb\": \"^1.5\"\r\n    }\r\n}\r\n```\r\nOr run:\r\n```bash \r\ncomposer require yhyasyrian/sydb\r\n```\r\n\r\n# Select\r\nIn the \"Select\" class, there are several methods of use, namely:\r\n`select_sql`, `select`, `fetch_all`, `fetch`\r\n\r\n    Used to fetch data\r\n## select_sql\r\nUse `select_sql` to display an integrated sql code that accepts three parameters:\r\n\\$table means the table, type `String`\r\n\\$where means where to search, type `Array` value defult=\"[]\", Syntax:\r\nColumn name =\u003e the value in it\r\n\\$etcWhere It is intended to add properties to the search, Methods will be developed for it in future updates, type `String` value defult=\"\".\r\nReturn Code Sql, `String` type.\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$sql = $SyDb-\u003eselect_sql('memers',['type'=\u003e'admin']);\r\necho $sql; // SELECT * FROM `memers` WHERE `type`='admin';\r\n// Example $_SESSION['user'] = 'Yhya'\r\n$sql = $SyDb-\u003eselect_sql('memers',['type'=\u003e'admin','user'=\u003e$_SESSION['user']]);\r\necho $sql; // SELECT * FROM `memers` WHERE `type`='admin' AND `user`='Yhya';\r\n// Exaple $message = 'Heelo \\' Yhya\" I am Hak';\r\n$sql = $SyDb-\u003eselect_sql('message',['message'=\u003e\"Heelo ' Yhya\\\" I am Hak\"]);\r\necho $sql; // SELECT * FROM `message` WHERE `message`='Heelo \u0026#39; Yhya\u0026#34; I am Hak';\r\n?\u003e\r\n```\r\n## select\r\nUse `select` to run sql code that accepts three parameters:\r\n\\$table means the table, type `String`\r\n\\$where means where to search, type `Array` value defult=\"[]\", Syntax:\r\nColumn name =\u003e the value in it\r\n\\$etcWhere It is intended to add properties to the search, Methods will be developed for it in future updates, type `String` value defult=\"\".\r\nReturn \\mysqli_result, `Object` type.\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$select = $SyDb-\u003eselect('memers',['type'=\u003e'band']);\r\n$select-\u003enum_rows; // Count rows ; int|string @link https://www.php.net/manual/en/mysqli-result.num-rows.php\r\n// And You Can View All Data\r\nwhile ($row = $SyDb-\u003efetch($select) /*\r\n    * It is shortcut for function mysqli_fetch_assoc\r\n*/) {\r\n    print_r($row); // For print this data\r\n}\r\n?\u003e\r\n```\r\n## fetch_all\r\nUse `fetch_all` to select all data that accepts three parameters:\r\n\\$table means the table, type `String`\r\n\\$where means where to search, type `Array` value defult=\"[]\", Syntax:\r\nColumn name =\u003e the value in it\r\n\\$etcWhere It is intended to add properties to the search, Methods will be developed for it in future updates, type `String` value defult=\"\".\r\nReturn Data rows, `Array` type.\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$fetch_all = $SyDb-\u003efetch_all('memers',['type'=\u003e'active']);\r\nprint_r($fetch_all); /* * Output is :\r\n    Array(\r\n         Array(\r\n            [id] =\u003e 1,\r\n            [type] =\u003e \"active\",\r\n            [name] =\u003e \"Yhya\"\r\n        ),\r\n        Array(\r\n            [id] =\u003e 2,\r\n            [type] =\u003e \"active\",\r\n            [name] =\u003e \"Saied\"\r\n        ),\r\n    )\r\n*/\r\n?\u003e\r\n```\r\n## fetch\r\nUse `fetch` to select first data that accepts three parameters:\r\n\\$table means the table, type `String`\r\n\\$where means where to search, type `Array` value defult=\"[]\", Syntax:\r\nColumn name =\u003e the value in it\r\n\\$etcWhere It is intended to add properties to the search, Methods will be developed for it in future updates, type `String` value defult=\"\".\r\nReturn Data row, `Array` type.\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$fetch = $SyDb-\u003efetch('memers',['type'=\u003e'active']);\r\nprint_r($fetch); /* * Output is :\r\n        Array(\r\n        [id] =\u003e 1,\r\n        [type] =\u003e \"active\",\r\n        [name] =\u003e \"Yhya\"\r\n    )\r\n*/\r\n?\u003e\r\n```\r\n# Insert\r\nIn the \"Insert\" class, there are several methods of use, namely:\r\n`insert_sql`, `insert`\r\n\r\n    Used to insert data\r\n## insert_sql\r\nUse `insert_sql` to display an integrated sql code for add data to database that accepts two parameters:\r\n\\$table means the table, type `String`\r\n\\$data means data that you want to add into database, type `Array` Syntax:\r\nColumn name =\u003e the value in it\r\nReturn Code Sql, `String` type.\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$sql = $SyDb-\u003einsert_sql('memers',['type'=\u003e'admin','name'=\u003e'Yhya']);\r\necho $sql; // INSERT INTO `memers` (`type`,`name`) VALUES ('admin','Yhya');\r\n$sql = $SyDb-\u003einsert_sql('memers',['type'=\u003e'active','name'=\u003e'Hello I am\\' Hack']);\r\necho $sql; // INSERT INTO `memers` (`type`,`name`) VALUES ('active','Hello I am\u0026#39; Hack');\r\n?\u003e\r\n```\r\n## insert\r\nUse `insert` to run an integrated sql code for add data to database that accepts two parameters:\r\n\\$table means the table, type `String`\r\n\\$data means data that you want to add into database, type `Array` Syntax:\r\nColumn name =\u003e the value in it\r\nReturn true, `Bool` type.\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$sql = $SyDb-\u003einsert('memers',['type'=\u003e'admin','name'=\u003e'Yhya']); // Adding to the database is done\r\n?\u003e\r\n```\r\n# Update\r\nIn the \"Update\" class, there are several methods of use, namely:\r\n`update_sql`, `update`\r\n\r\n    Used to update data\r\n## update_sql\r\nUse `update_sql` to display an integrated sql code for update data to database that accepts three parameters:\r\n\\$table means the table, type `String`\r\n\\$where means where data that you want to update into database, type `Array` Syntax:\r\nColumn name =\u003e the value in it\r\n\\$new means data that you want to update into database, type `Array` Syntax:\r\nColumn name =\u003e the value in it\r\nReturn Code Sql, `String` type.\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$sql = $SyDb-\u003eupdate_sql('memers',['type'=\u003e'admin','name'=\u003e'Yhya'],['status'=\u003e\"online\"]);\r\necho $sql; // UPDATE `memers` SET `status`='online' WHERE `type`='admin' AND `name`='Yhya';\r\n$sql = $SyDb-\u003eupdate_sql('memers',['type'=\u003e'active','name'=\u003e'Hello I am\\' Hack'],['status'=\u003e\"ofline\"]);\r\necho $sql; // UPDATE `memers` SET `status`='ofline' WHERE `type`='active' AND `name`='Hello I am\u0026#39; Hack';\r\n?\u003e\r\n```\r\n## update\r\nUse `update` to run an integrated sql code for update data to database that accepts three parameters:\r\n\\$table means the table, type `String`\r\n\\$where means where data that you want to update into database, type `Array` Syntax:\r\nColumn name =\u003e the value in it\r\n\\$new means data that you want to update into database, type `Array` Syntax:\r\nColumn name =\u003e the value in it\r\nReturn `Void` type.\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$SyDb-\u003eupdate('memers',['type'=\u003e'admin','name'=\u003e'Yhya'],['status'=\u003e\"online\"]);\r\n$SyDb-\u003eupdate('memers',['type'=\u003e'active','name'=\u003e'Hello I am\\' Hack'],['status'=\u003e\"ofline\"]);\r\n?\u003e\r\n```\r\n# Delete\r\nIn the \"Delete\" class, there are several methods of use, namely:\r\n`delete_sql`, `delete`\r\n\r\n    Used to delte data\r\n## delete_sql\r\nUse `delete_sql` to display sql code that accepts three parameters:\r\n\\$table means the table, type `String`\r\n\\$where means where to delete from Database, type `Array` Syntax:\r\nColumn name =\u003e the value in it\r\nReturn Code Sql, `String` type.\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$sql = $SyDb-\u003edelete_sql('memers',['type'=\u003e'admin']);\r\necho $sql; // SELECT * FROM `memers` WHERE `type`='admin';\r\n$sql = $SyDb-\u003edelete_sql('message',['message'=\u003e\"Heelo ' Yhya\\\" I am Hak\"]);\r\necho $sql; // DELETE FROM `message` WHERE `message`='Heelo \u0026#39; Yhya\u0026#34; I am Hak';\r\n?\u003e\r\n```\r\n## delete\r\nUse `delete` to run sql code that accepts three parameters:\r\n\\$table means the table, type `String`\r\n\\$where means where to delete from Database, type `Array` Syntax:\r\nColumn name =\u003e the value in it\r\nReturn `Void` type.\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$SyDb-\u003edelete('memers',['type'=\u003e'admin']);\r\n$SyDb-\u003edelete('message',['message'=\u003e\"Heelo ' Yhya\\\" I am Hak\"]);\r\n?\u003e\r\n```\r\n# Query\r\nIn the \"Query\" class, there are several methods of use, namely:\r\n`query`\r\n\r\n    Used to run sql code\r\n## query\r\nUse `query` to run sql code that accepts one parameters:\r\n\\$query means sql code a type mixed\r\nReturn `Mixed` type\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$SyDb-\u003equery(\"INSERT INTO `memers` (`type`,`name`) VALUES ('active','Hello I am\u0026#39; Hack');\");\r\n// Or\r\n$SyDb-\u003equery(\r\n    $SyDb-\u003einsert_sql('memers',['type'=\u003e'active','name'=\u003e'Hello I am\\' Hack'])\r\n);\r\n// Or \r\n$SyDb-\u003einsert('memers',['type'=\u003e'active','name'=\u003e'Hello I am\\' Hack'])\r\n```\r\n\r\n    {Note}: Using the method can directly cause a sql injection-type hack.\r\n    To avoid the problem use the available methods, Example: select, update, etc ...    \r\n# Connect\r\nIn the \"Connect\" class, there are several methods of use, namely:\r\n`connect`\r\n\r\n    Used to connect database\r\n## connect\r\nUse connect a database and don't need parameters\r\nReturn true, `Bool` type\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database'); // Coonect DataBase simple\r\n//  Or\r\n$SyDb-\u003econnect();\r\n```\r\n    {Note}: In PHP CLI between each connection there is an interval (Defult 15s)\r\n# Close\r\nIn the \"Close\" class, there are several methods of use, namely:\r\n`close`\r\n\r\n    Used to end connect database\r\n## close\r\nUse end connect a database and don't need parameters\r\nReturn true, `Bool` type\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database'); \r\n$SyDb-\u003eclose();\r\n$Sydb-\u003equery('SELECT * FROM `table`'); // Error beacuse not found connect, you can connect with function connect()\r\n```\r\n# Table\r\nIn the \"Table\" class, there are several methods of use, namely:\r\n`viewTable`, `exportTable`, `exportTables`\r\n\r\n    Used to tables  a database\r\n## viewTable\r\nUse view a tables in database and don't need parameters\r\nReturn all tables, `Array` type\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$tables = $SyDb-\u003eviewTable();\r\nprint_r($tables); /* * Output is:\r\n    Array(\r\n        [0] =\u003e Members,\r\n        [1] =\u003e Tokens,\r\n        [2] =\u003e Logs,\r\n        [3] =\u003e Sitting,\r\n        [4] =\u003e CronsJob\r\n    )\r\n*/\r\n?\u003e\r\n```\r\n## exportTable\r\nUse export a table in database and three parameters:\r\n\\$table means the table, type `String`\r\n\\$dir means the path for save files in it, type `String`\r\n\\$bool for add number time UNIX for name file export, type `Bool`\r\nReturn true, `bool` type\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$SyDb-\u003eexportTable('Members','.'); // you can show file Members.sql\r\n```\r\n## exportTables\r\nUse export a tables in database and tow parameters:\r\n\\$dir means the path for save files in it, type `String`\r\n\\$bool for add number time UNIX for name file export, type `Bool`\r\nReturn true, `bool` type\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$SyDb-\u003eexportTables('.'); // you can show file Members.sql\r\n```\r\n# Error\r\nIn the \"Error\" class, In order to classify errors\r\n\r\n    Used to show errors\r\n## Exception\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\ntry{\r\n    $SyDb = new SyDb('localhost','root','passNoTrue','database');\r\n} catch (\\YhyaSyrian\\Sql\\Exception $error) {\r\n    // The error from database\r\n    echo $error-\u003egetMessage();\r\n} catch (\\Throwable $error) {\r\n    // The error from your file\r\n    echo $error-\u003egetMessage();\r\n}\r\n```\r\n# Function Helps\r\nSome functions help this library Example:\r\n* [Add data where](#addwhere)\r\n* [Starting column](#startcolumn)\r\n* [Ending column](#endcolumn)\r\n* [Allocate contact time](#settimeconnect)\r\n## AddWhere\r\nThe function renders an array as a generic factor of all connections\r\n\r\nExample:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$SyDb-\u003eaddWhere(['site'=\u003e($_SERVER['SERVER_NAME'] ?? \"CLI\")]);\r\necho $SyDb-\u003eselect_sql('member',['type'=\u003e'admin']); // SELECT * FROM `member` WHERE `type`='admin' AND `site`='CLI';\r\necho $SyDb-\u003einsert_sql('member',['type'=\u003e'admin','name'=\u003e\"Yhya\"]); // INSERT INTO `member` (`type`,`name`,`site`) VALUES ('admin','Yhya','CLI');\r\necho $SyDb-\u003edelete_sql('member',['type'=\u003e'banded']); // DELETE FROM `member` WHERE `type`='banded' AND `site`='CLI';\r\necho $SyDb-\u003eupdate_sql('member',['status'=\u003e'ofline','name'=\u003e\"test\"],['status'=\u003e\"online\"]); // UPDATE `member` SET `status`='online' WHERE `status`='ofline' AND `name`='test' AND `site`='CLI';\r\n```\r\n    {Advice}: It may be difficult to add the array manually if you want to change your storage format\r\n## StartColumn\r\nIf you want get data but start id or last time, you should function `StartColumn` where you can set limit and offset example:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\necho $SyDb-\u003eselect_sql('member',['type'=\u003e'admin'],$SyDb-\u003eStartColumn('id',100,0)); // SELECT * FROM `member` WHERE `status`='admin' ORDER BY id LIMIT 0,100;\r\n```\r\n## EtartColumn\r\nIf you want get data but end id or new time, you should function `EtartColumn` where you can set limit and offset example:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\necho $SyDb-\u003eselect_sql('member',['type'=\u003e'admin']); // SELECT * FROM `member` WHERE `status`='admin' ORDER BY id DESC LIMIT 0,100;\r\n```\r\n## SetTimeConnect\r\nIf you use this library with CLI, you can set time connect when every connect such as : you connect every second you don't be forced to create connections new becuse the servers are limting connections example:\r\n```php\r\n\u003c?php\r\nrequire 'vendor/autoload.php';\r\nuse \\YhyaSyrian\\Sql\\SyDb;\r\n$SyDb = new SyDb('localhost','root','pass','database');\r\n$SyDb-\u003esetTimeConnect(10);\r\n$startTime = time();\r\n$i = 0;\r\nwhile ($startTime \u003e (time() - 30)) {\r\n    $SyDb-\u003econnect();\r\n    echo $i++.\"-number\\r\";\r\n    sleep(1);\r\n}\r\n// Connect 3 item\r\n```\r\nEnd documentation, if you want any project, you can contact us with email: yhya.syrian@gmail.com\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhyasyrian%2Fsydb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyhyasyrian%2Fsydb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhyasyrian%2Fsydb/lists"}