accounting: fix num_rows without call from $db
$res->num_rows will not work on PostgreSQL. $db->num_rows() must be used instead to execute the correct procedure depending on the database backend.
This commit is contained in:
parent
e607fc8792
commit
eaa51fed7b
1 changed files with 1 additions and 1 deletions
|
|
@ -295,7 +295,7 @@ function getDefaultDatesForTransfer()
|
|||
$sql .= " WHERE date_start < '".$db->idate(dol_now())."' AND date_end > '".$db->idate(dol_now())."'";
|
||||
$sql .= $db->plimit(1);
|
||||
$res = $db->query($sql);
|
||||
if ($res->num_rows > 0) {
|
||||
if ($db->num_rows($res) > 0) {
|
||||
$obj = $db->fetch_object($res);
|
||||
|
||||
$date_start = $db->jdate($obj->date_start);
|
||||
|
|
|
|||
Loading…
Reference in a new issue