Download the PHP package murage/sqlddl without Composer

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

Latest Stable Version Total Downloads License Coverage Status

Installation

First ensure the PHP version is greater or equal to 7

To include the library in an existing project using composer

composer require murage/sqlddl

or in composer.json add as dependency

"murage/sqlddl" : "^2.1.0"

This library is dependent on PHP dotenv and requires .env file at root of the project (env file does not have file name only extension .env; an example is provided). To get started include the following ENV variables to be able to get started (change as per your database connection)

where
DB_NAME=your database name

DB_USERNAME=your database username

DB_PASSWORD=your database password

Usages

The library utilizes nesting of functions, and does not require instantiating the Builder class. Start each query using :-

Builder::table( "provide the table name here")

Every query returns a json encoded response in format

{ "status": "either error or success",
  "response : "the response from the server",
  "code":"response code"
}

The code depends on the query being executed but on successful query, a code of 200 is returned. Where data is being fetched from the database, an array of records is returned in the response body e.g. :

{"status":success;
"response":
   [
    {"id":5, "colum1":"valueX"},
    {"id":6, "colum1":"valueK"}
    ],
 "code":200
}

Other response codes are here. All queries that normally do not fetch any value from the database on successful execution will return

{"status":success;
"response": "success",
 "code":200
}

To perform a basic select from table test

Builder::table('test')
    ->get();

or to just select everything in the table

Builder::table('test')
      ->all();

To select only fifty records

 Builder::table('test')
        ->get(50);

To select only 3 columns

    Builder::table('test)
        ->select('column1','column2','column3')
        ->get()

To select column1 but alias as name

Builder::table('test)
            ->select('column1 as name','column2','column3')
            ->get()

To select using where condition

To perform an insert

Builder::table('test)
        ->insert('data1','data2','data3')
        ->into('column1','column2','column3')

To truncate table test

Builder::table('test')
->truncate();

To drop table test

Builder::table('test')
->drop();
An up-to date documentation is cooking 🍴

All versions of sqlddl with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
vlucas/phpdotenv Version 3.4.*
ext-json Version *
ext-pdo 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 murage/sqlddl contains the following files

Loading the files please wait ....