Download the PHP package gorgo/golibdatabase without Composer

On this page you can find all versions of the php package gorgo/golibdatabase. 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 golibdatabase

golib-database

golib database layer

install

composer composer require gorgo/golibdatabase

basic usage

connect to a mysql Database

Connection Manager

is written for cases you can not be sure the connection is already existing (for example by replacing a singelton db implementation)

Table Example

Explain by example.

Table Structure and Content.

step 1: Build a Propertie Class that reflects the structure of the database. this class have to extend from golib\Types\PropsFactory

Like so:

Step 2: Define the Table Class that points to the table, and setup the Propertie Class and the Tablename.

That is all what is needed to setup the basic Model for a Table. to read from this this table you make a new instance of these class and fetch the Data by using a existing Database Connection.

Now we have a Modell of the Database Table as an PHP-Object this will read the full content of the Table and assign it to row-objects.

WhereSet

But mostly you don't need the whole Content. in MySQL you handle this by adding a where statement to filter the result. The same can be done by using a WhereSet.

so change the code in the example

now we will got the matching values only.

Limit

The Limit class is usefull to Limit the Amount of entries like the regular Limit from MySQL. A instance of Limit have to be the second Parameter.

this object have just to Properties. start defines the offset and count the count of entries.

Order


All versions of golibdatabase with dependencies

PHP Build Version
Package Version
Requires php Version 8.*
gorgo/golib Version 0.2.1
ext-mysqli Version *
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 gorgo/golibdatabase contains the following files

Loading the files please wait ....