PHP code example of hypercode / query

1. Go to this page and download the library: Download hypercode/query 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/ */

    

hypercode / query example snippets


$query = new Query;
$query->select('tabela');

$query = new Query;
$query->select('tabela','name, age, another');

$query = new Query;
$query->select('tabela')->limit(1);

$query = new Query;
$query->select('tabela')->where(['id' => 1]);
$query->select('tabela')->where(['nome' => 'Antonio']);

$query = new Query;
$query->insert('tabela', ['id','name','age', 'created_at']);

$query = new Query;
$query->insert('tabela', ['id','name','age', 'created_at'])
->addValue(1,'Charles',18, 'NOW()')
->addValue(1,'Kevin', 10, time());

$query = new Query;
$query->delete('tabela');

$query = new Query;
$query->delete('tabela')->where(['id' => 10]);

$query = new Query;
$query->update('tabela')->set('name','Gabriel');

$query->update('tabela')
    ->set('id',1)
    ->set('name','Gabriel')->where(['id' => 1]);