PHPackages                             yhyasyrian/sydb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. yhyasyrian/sydb

ActiveLibrary[Database &amp; ORM](/categories/database)

yhyasyrian/sydb
===============

Library communication and dealing with databases

v1.5.3(2y ago)1219[1 issues](https://github.com/yhyasyrian/SyDb/issues)proprietaryPHPPHP &gt;=7.2

Since Jul 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/yhyasyrian/SyDb)[ Packagist](https://packagist.org/packages/yhyasyrian/sydb)[ RSS](/packages/yhyasyrian-sydb/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (35)Used By (0)

SyDb
====

[](#sydb)

Syrian DataBase It is a simple library that depends on connecting to databases via mysql that performs data processing, as it converts ordinary data into `sql` code. The 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.

Note
----

[](#note)

This 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

Index A sequential list of methods: [Install Library](#install-library) How to install library SyDb [Select Data](#select) Get data from the database [Insert Data](#insert) Set data from the database [Update Data](#update) Update data from the database [Delete Data](#delete) Delete data from the database [Query SQL](#query) Run SQL code [Connect DataBase](#connect) New connect database [Close Connect DataBase](#close) Close the connect present [Table](#table) Table properties [Error](#error) Error Exception Some future:

- [Add data where](#addwhere)
- [Starting column](#startcolumn)
- [Ending column](#endcolumn)
- [Allocate contact time](#settimeconnect)

install-Library
===============

[](#install-library)

You 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:

```
{
    "require": {
        "yhyasyrian/sydb": "^1.5"
    }
}
```

Or run:

```
composer require yhyasyrian/sydb
```

Select
======

[](#select)

In the "Select" class, there are several methods of use, namely: `select_sql`, `select`, `fetch_all`, `fetch`

```
Used to fetch data

```

select\_sql
-----------

[](#select_sql)

Use `select_sql` to display an integrated sql code that accepts three parameters: $table means the table, type `String`$where means where to search, type `Array` value defult="\[\]", Syntax: Column name =&gt; the value in it $etcWhere It is intended to add properties to the search, Methods will be developed for it in future updates, type `String` value defult="". Return Code Sql, `String` type.

Example:

```
