1. Go to this page and download the library: Download phiconsultors/gcf 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/ */
phiconsultors / gcf example snippets
/**
* Application initialization
*/
use gcf\Environment;
h (Exception $ex) {
die($ex->getMessage());
}
$myQuery = new SQLQuery($db);
$myQuery->fer_consulta("select ID, USER, NAME from user where id=3");
while(!$consulta->Eof())
{
$user = $consulta->row['USER'];
$name = $consulta->row['NAME'];
$consulta->Skip();
}
$consulta->tanca_consulta();
$myQuery = new SQLQuery($db);
$myQuery->PrepareQuery("select ID, USER, NAME from user where id=3");
foreach (new ResultSet($myQuery, "ID") as $record)
{
// Can access each field with, for example: $record->USER or $record->NAME and so on.
}
class User extends MyAppDataMapper
{
public function __construct($tableName="USER", $pk="ID", $pkType="int")
{
parent::__construct($tableName, $pk, $pkType);
}
}
/**
* Class User
* @property int ID
* @property string USER
* @property string NAME
*/
class User extends MyAppDataMapper
{
public function __construct($tableName="USER", $pk="ID", $pkType="int")
{
parent::__construct($tableName, $pk, $pkType);
}
}