Skip to content
Snippets Groups Projects
Commit 8f4973f3 authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: databases compatibility

parent 6826ce7b
No related branches found
No related tags found
No related merge requests found
...@@ -85,8 +85,8 @@ $sql.= " u.entity, u.ldap_sid, s.nom"; ...@@ -85,8 +85,8 @@ $sql.= " u.entity, u.ldap_sid, s.nom";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_societe = s.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_societe = s.rowid";
$sql.= " WHERE u.entity IN (0,".$conf->entity.")"; $sql.= " WHERE u.entity IN (0,".$conf->entity.")";
$sql.= " ORDER BY u.datec"; $sql.= $db->order("u.datec","DESC");
$sql.= " DESC limit $max"; $sql.= $db->plimit($max);
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)
...@@ -148,7 +148,7 @@ $sql = "SELECT g.rowid, g.nom, g.note, g.entity, g.datec"; ...@@ -148,7 +148,7 @@ $sql = "SELECT g.rowid, g.nom, g.note, g.entity, g.datec";
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup as g"; $sql.= " FROM ".MAIN_DB_PREFIX."usergroup as g";
$sql.= " WHERE g.entity IN (0,".$conf->entity.")"; $sql.= " WHERE g.entity IN (0,".$conf->entity.")";
$sql.= $db->order("g.datec","DESC"); $sql.= $db->order("g.datec","DESC");
$sql.= $db->limit($max); $sql.= $db->plimit($max);
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment