add num row test
This commit is contained in:
parent
f2435f6247
commit
e230a3a264
@ -313,8 +313,10 @@ abstract class DoliDB implements Database
|
|||||||
$res = $this->query($sql);
|
$res = $this->query($sql);
|
||||||
if ($res)
|
if ($res)
|
||||||
{
|
{
|
||||||
|
if($this->num_rows($res) > 0) {
|
||||||
$Tresult = $this->fetch_row($res);
|
$Tresult = $this->fetch_row($res);
|
||||||
return $Tresult[0];
|
return reset($Tresult);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user