Update DoliDB.class.php
This commit is contained in:
parent
dd8d4e9e98
commit
3959d12a39
@ -312,17 +312,15 @@ abstract class DoliDB implements Database
|
||||
*/
|
||||
public function getRow($sql)
|
||||
{
|
||||
$sql .= ' LIMIT 1;';
|
||||
$sql .= ' LIMIT 1';
|
||||
|
||||
$res = $this->query($sql);
|
||||
if ($res)
|
||||
{
|
||||
if ($res) {
|
||||
$obj = $this->fetch_object($res);
|
||||
if(!$obj){
|
||||
return 0;
|
||||
}
|
||||
else{
|
||||
if ($obj) {
|
||||
return $obj;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user