Overview Version History Q & A Rating & Review
📋 Sobre o projeto
✅ Os snippets que a extenção atual possui são:
$sql = new Sql($this->$var);
$select = $sql->select();
$where = new Where();
// $where;
$select->from(['t'=>'table'])
->where($where);
$rows = [];
$rs = $sql->prepareStatementForSqlObject($select)->execute();
foreach($rs as $ln)
{
$rows[] = $ln;
}
return $rows;
$sql = new Sql($this->$var);
$select = $sql->select();
$where = new Where();
// $where;
$select->from(['t'=>'table'])
->where($where);
return $sql->prepareStatementForSqlObject($select)->execute()->current();
📌 Select para verificação de registro, retornando um valor booleano
$sql = new Sql($this->$var);
$select = $sql->select();
$where = new Where();
// $where;
$select->from(['t'=>'table'])
->where($where);
return $sql->prepareStatementForSqlObject($select)->execute()->count() > 0 ? true : false;
$sql = new Sql($this->variable);
$where = new Where();
$where->equalTo('value','value');
$update = $sql->update('table')
->set([
'column' => 'value'
])
->where($where);
$sql->prepareStatementForSqlObject($update)->execute();
📌 Create a private function
private function Test()
{
// code...
}
📌 Create a public function
public function Test()
{
// code...
}
sqlbs echo '<pre>'; var_dump($sql->buildSqlString($select)); die();
📌 Outros
if(isset($foo) && !empty($foo))
{
return $foo;
}
php <?php ?>
ephp <?= ?>
cphp ?> <?php
issem (isset($v) && !empty($v) ? true : false)
dd echo '<pre>'; var_dump($v) die();
decode mb_convert_encoding($v, 'UTF-8', 'ISO-8859-1')