Download the PHP package beeflow/sqlquerymanager without Composer

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

Simple SQL query manager

A simple SQL query manager with option to secure queries by setting parameter type.

It uses classes which represents siple var types as string, integer etc... and own classes like secureString, email etc...

To better secure queries, you can create your own var types classes, for example password or phone

Install

composer

$ composer require "beeflow/sqlquerymanager:dev-master"

GIT

$ git clone https://github/beeflow/

and then add to app/AppKernel.php

public function registerBundles()
{
    ...
    new Beeflow\SQLQueryManager\SQLQueryBundle(),
}

To add new Vartype just insert into your services.yml

app.YourVarType:
    class: YourBundle\Lib\Vartypes\YourVarType;
    tags:
        - { name: beeflow.sql_manager.vartype, alias: yourVarTypeAlias }

and now you can use it in SQL query:

SELECT example1 FROM exampleTable WHERE example = {value->yourVarTypeAlias}

Examples

SQL query example:

SELECT example1 FROM exampleTable WHERE example = {value->secureString}

Using SQLQueryManager as Symfony service

In your Controller:

$sqlManager = $this->get('beeflow.sql_query_manager');

Set default directory with SQL files

$slqlManager->setSqlDirectory('sql_directory');

Use query as a method with temporary different directory with SQL files:

$slqlManager->sqlExample([
      'value'                  => 'TEST_VALUE',
      'value2'                 => 11,
      'vatno'                  => '1111111111',
      'valueArrayWithoutAtype' => array('one', 'two', 'tree')
], 'someTmpDirectory');

Example with new method of calling SQL files

`<?php

    use Beeflow\SQLQueryManager\SQLQuery

    try {
        $query = new SQLQuery();
        $query->sqlExample([
                'value'                  => 'TEST_VALUE',
                'value2'                 => 11,
                'vatno'                  => '1111111111',
                'valueArrayWithoutAtype' => array('one', 'two', 'tree')
        ]);

        echo $query->getQuery();
    } catch (Exception $ex) {
        echo $ex->getMessage();
    }`

Example with a correct data:

`<?php

use Beeflow\SQLQueryManager\SQLQuery

try {
    $query = new SQLQuery("sqlExample");
    $query->value = 'TEST_VALUE';

    // if you set a string value it will be set as 0 (zero) because (integer)'ddd' = 0 (zero)
    $query->value2 = 11;

    // polish vat no algoritm allows to use 1111111111 vat number
    // if you want to check an european vat no see:
    // http://www.phpclasses.org/package/2280-PHP-Check-if-a-European-VAT-number-is-valid.html
    $query->vatno = '1111111111';

    $query->valueArrayWithoutAtype = array('one', 'two', 'tree');
    $query->valueWithoutParamType = "value Without Param Type";

    echo $query->getQuery();
} catch (Exception $ex) {
    echo $ex->getMessage();
}`

Example with incorrect data:

`<?php

use Beeflow\SQLQueryManager\SQLQuery

try {
    $newQuery = new SQLQuery("sqlExample");
    $newQuery->value = 'TEST_VALUE';
    $newQuery->value2 = 11;

    // incorrect polish vat no
    $newQuery->vatno = '1212111211';

    $query->valueArrayWithoutAtype = array('one', 'two', 'tree');
    $query->valueWithoutParamType = "value Without Param Type";
    echo $newQuery->getQuery();
} catch (Exception $ex) {
    echo $ex->getMessage();
}`

Example with conditioned value:

`<?php

use Beeflow\SQLQueryManager\SQLQuery

try {
    $query = new SQLQuery("sqlExample");
    $query->value = 'TEST_VALUE';

    // if you set a string value it will be set as 0 (zero) because (integer)'ddd' = 0 (zero)
    $query->value2 = 11;
    $query->vatno = '1111111111';

    $query->valueArrayWithoutAtype = array('one', 'two', 'tree');
    $query->valueWithoutParamType = "value Without Param Type";

    // condition !empty()
    $query->notEmptyValue = 1;

    echo $query->getQuery();
} catch (Exception $ex) {
    echo $ex->getMessage();
}`

All versions of sqlquerymanager with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
symfony/framework-bundle Version >=3.4
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 beeflow/sqlquerymanager contains the following files

Loading the files please wait ....