1. Go to this page and download the library: Download castroitalo/echoquery 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/ */
castroitalo / echoquery example snippets
// Importing library
use CastroItalo\EchoQuery\Builder;
// Instanciate class
$echo_query = new Builder();
$query = $echo_query->select(
['column_one', 'co'],
['column_two']
)
->from('table_one', 'to')
->where('column_one')
->equalsTo(2)
->and('column_two')
->equalsTo(5)
->getQuery();
use CastroItalo\EchoQuery\Builder;
$query = (new Builder())->select(
['column_one']
)
->from('table_one')
->getQuery();
use CastroItalo\EchoQuery\Builder;
$query = (new Builder())->select(
['*']
)
->from('table_one')
->getQuery();
use CastroItalo\EchoQuery\Builder;
$query = (new Builder())->select(
['column_one', 'co'],
['column_two', 'ct'],
['column_three', 'ctr']
)
->from('table_one')
->getQuery();
use CastroItalo\EchoQuery\Builder;
$query = (new Builder())->select(
['column_one', 'co'],
['column_two', 'ct'],
['column_three', 'ctr']
)
->from('table_one')
->where('column_on')
->greaterThan(10)
->getQuery();