PHP code example of phizzl / querygenerate

1. Go to this page and download the library: Download phizzl/querygenerate library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

phizzl / querygenerate example snippets


use Phizzl\QueryGenerate\Drivers\MysqlDriver;
use Phizzl\QueryGenerate\Drivers\MysqlQueryEscape;
use Phizzl\QueryGenerate\Factory\Factory;
use Phizzl\QueryGenerate\QueryGenerator;

$loader = ator
    ->table('test', array('engine' => 'InnoDB', 'collation' => 'utf8_general_ci'))
    ->setIsCreated(true)
    ->addColumn('OXID', 'char', array('length' => 32, 'collation' => 'latin1_general_ci'))
    ->addColumn('test', 'int', array('length' => 11, 'autoincrement' => true))
    ->changeColumn('Spalte 1', 'TINYINT', array('rename' => 'Spalte Spass', 'length' => 1))
    ->addIndex(array('test'))
    ->setPrimaryKey(array('OXID'))
    ->generate();