fixed change of framework

This commit is contained in:
2026-09-10 11:43:07 +07:00
parent a2978ae927
commit bd93cca382
18 changed files with 244 additions and 246 deletions
+7 -10
View File
@@ -37,7 +37,7 @@ final class SQL {
private array $_awhere = [];
protected Engine $app;
protected SimplePdo $db;
protected array webuser;
protected array $webuser;
/**
* @param Engine $app
@@ -45,7 +45,7 @@ final class SQL {
public function __construct(Engine $app){
$this->app = $app;
$this->db = $app->db();
$this->webuser = $app->session()->get('__WEB_USER', ['UserID'=>0, 'UNIX'=>0]);
$this->webuser = $app->session()->get('WEB_USER', ['UserID'=>0, 'UNIX'=>0]);
}
//todo: deprecated
@@ -57,20 +57,18 @@ final class SQL {
$this->_ttable = $table;
}
public function add_param(string $param = "", string|int|null $value = null, bool $nomor = false): void {
$req = Param::Get($param);
public function add_param(string $param = "", mixed $value = null, bool $nomor = false): void {
$this->_afield[] = [
'field' => $param,
'value' => (is_null($value) && !empty($req)) ? $req : $value,
'value' => is_null($value) ? Param::Get($param) : $value,
'numbe' => $nomor,
];
}
public function add_param_date(string $param = "", string|null $value = null): void {
$req = Param::Get($param);
$this->_afield[] = [
'field' => $param,
'value' => tgl_sql2str((is_null($value) && !empty($req)) ? $req : $value),
'value' => tgl_sql2str(is_null($value) ? Param::Get($param) : $value),
'numbe' => false,
];
}
@@ -115,11 +113,10 @@ final class SQL {
];
}
public function add_where(string $field = "", string|int|null $value = null, bool $nomor = false): void {
$req = Param::Get($param);
public function add_where(string $field = "", mixed $value = null, bool $nomor = false): void {
$this->_awhere[] = [
'field' => $field,
'value' => (is_null($value) && !empty($req)) ? $req : $value,
'value' => is_null($value) ? Param::Get($field) : $value,
'numbe' => $nomor,
];
}