Function load : give the return type

This commit is contained in:
sparkyx 2023-01-05 11:37:26 +01:00
parent c9a16035ca
commit 073c0efbef
29 changed files with 45 additions and 40 deletions

View file

@ -121,7 +121,7 @@ class Acc_Plan_SQL extends Data_SQL
{
return $this->id;
}
public function load()
public function load():bool
{
$pk=$this->primary_key;
if ( $this->get_limit_fiche_qcode() != 0 )
@ -135,13 +135,14 @@ class Acc_Plan_SQL extends Data_SQL
if ($this->cn->count()==0)
{
$this->$pk=-1;
return;
return false;
}
foreach ($result[0] as $key=> $value)
{
$this->$key=$value;
}
return true;
}
public function seek($cond='', $p_array=null)

View file

@ -63,7 +63,7 @@ class V_Contact_SQL extends Data_SQL
throw new Exception("not implemented");
}
function load()
function load():bool
{
$array=$this->cn->get_row("select * from ".$this->table." where f_id=$1",array($this->f_id));
if (empty ($array) ) { $this->f_id=-1;return false;}

View file

@ -108,7 +108,7 @@ class V_Currency_Last_Value_SQL extends Data_SQL
}
public function load()
public function load():bool
{
$sql=" select ";
$sep="";
@ -133,13 +133,14 @@ class V_Currency_Last_Value_SQL extends Data_SQL
if ($this->cn->count()==0)
{
$this->$pk=-1;
return;
return false;
}
foreach ($result[0] as $key=> $value)
{
$this->$key=$value;
}
return true;
}
function seek($cond='', $p_array=null)