Download the PHP package yhyasyrian/sydb without Composer

On this page you can find all versions of the php package yhyasyrian/sydb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package 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

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 How to install library SyDb Select Data Get data from the database Insert Data Set data from the database Update Data Update data from the database Delete Data Delete data from the database Query SQL Run SQL code Connect DataBase New connect database Close Connect DataBase Close the connect present Table Table properties Error Error Exception Some future:

Or run:

Select

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

Used to fetch data

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

select

Use select to run sql code that accepts three parameters: \$table means the table, type String \$where means where to search, type Array value defult="[]", Syntax: Column name => 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 \mysqli_result, Object type.

Example:

fetch_all

Use fetch_all to select all data that accepts three parameters: \$table means the table, type String \$where means where to search, type Array value defult="[]", Syntax: Column name => 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 Data rows, Array type.

Example:

fetch

Use fetch to select first data that accepts three parameters: \$table means the table, type String \$where means where to search, type Array value defult="[]", Syntax: Column name => 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 Data row, Array type.

Example:

Insert

In the "Insert" class, there are several methods of use, namely: insert_sql, insert

Used to insert data

insert_sql

Use insert_sql to display an integrated sql code for add data to database that accepts two parameters: \$table means the table, type String \$data means data that you want to add into database, type Array Syntax: Column name => the value in it Return Code Sql, String type.

Example:

insert

Use insert to run an integrated sql code for add data to database that accepts two parameters: \$table means the table, type String \$data means data that you want to add into database, type Array Syntax: Column name => the value in it Return true, Bool type.

Example:

Update

In the "Update" class, there are several methods of use, namely: update_sql, update

Used to update data

update_sql

Use update_sql to display an integrated sql code for update data to database that accepts three parameters: \$table means the table, type String \$where means where data that you want to update into database, type Array Syntax: Column name => the value in it \$new means data that you want to update into database, type Array Syntax: Column name => the value in it Return Code Sql, String type.

Example:

update

Use update to run an integrated sql code for update data to database that accepts three parameters: \$table means the table, type String \$where means where data that you want to update into database, type Array Syntax: Column name => the value in it \$new means data that you want to update into database, type Array Syntax: Column name => the value in it Return Void type.

Example:

Delete

In the "Delete" class, there are several methods of use, namely: delete_sql, delete

Used to delte data

delete_sql

Use delete_sql to display sql code that accepts three parameters: \$table means the table, type String \$where means where to delete from Database, type Array Syntax: Column name => the value in it Return Code Sql, String type.

Example:

delete

Use delete to run sql code that accepts three parameters: \$table means the table, type String \$where means where to delete from Database, type Array Syntax: Column name => the value in it Return Void type.

Example:

Query

In the "Query" class, there are several methods of use, namely: query

Used to run sql code

query

Use query to run sql code that accepts one parameters: \$query means sql code a type mixed Return Mixed type

Example:

{Note}: Using the method can directly cause a sql injection-type hack.
To avoid the problem use the available methods, Example: select, update, etc ...    

Connect

In the "Connect" class, there are several methods of use, namely: connect

Used to connect database

connect

Use connect a database and don't need parameters Return true, Bool type

Example:

{Note}: In PHP CLI between each connection there is an interval (Defult 15s)

Close

In the "Close" class, there are several methods of use, namely: close

Used to end connect database

close

Use end connect a database and don't need parameters Return true, Bool type

Example:

Table

In the "Table" class, there are several methods of use, namely: viewTable, exportTable, exportTables

Used to tables  a database

viewTable

Use view a tables in database and don't need parameters Return all tables, Array type

Example:

exportTable

Use export a table in database and three parameters: \$table means the table, type String \$dir means the path for save files in it, type String \$bool for add number time UNIX for name file export, type Bool Return true, bool type

exportTables

Use export a tables in database and tow parameters: \$dir means the path for save files in it, type String \$bool for add number time UNIX for name file export, type Bool Return true, bool type

Error

In the "Error" class, In order to classify errors

Used to show errors

Exception

Example:

Function Helps

Some functions help this library Example:

Example:

{Advice}: It may be difficult to add the array manually if you want to change your storage format

StartColumn

If you want get data but start id or last time, you should function StartColumn where you can set limit and offset example:

EtartColumn

If you want get data but end id or new time, you should function EtartColumn where you can set limit and offset example:

SetTimeConnect

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

End documentation, if you want any project, you can contact us with email: [email protected]


All versions of sydb with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yhyasyrian/sydb contains the following files

Loading the files please wait ...