From 8f4973f3daf704438f74dde470f35ee9e3dbcd13 Mon Sep 17 00:00:00 2001
From: Regis Houssin <regis@dolibarr.fr>
Date: Thu, 12 Aug 2010 13:35:08 +0000
Subject: [PATCH] Fix: databases compatibility

---
 htdocs/user/home.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/htdocs/user/home.php b/htdocs/user/home.php
index 4a3b8972665..fcd79c61e71 100644
--- a/htdocs/user/home.php
+++ b/htdocs/user/home.php
@@ -85,8 +85,8 @@ $sql.= " u.entity, u.ldap_sid, s.nom";
 $sql.= " FROM ".MAIN_DB_PREFIX."user as u";
 $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_societe = s.rowid";
 $sql.= " WHERE u.entity IN (0,".$conf->entity.")";
-$sql.= " ORDER BY u.datec";
-$sql.= " DESC limit $max";
+$sql.= $db->order("u.datec","DESC");
+$sql.= $db->plimit($max);
 
 $resql=$db->query($sql);
 if ($resql)
@@ -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.= " WHERE g.entity IN (0,".$conf->entity.")";
 $sql.= $db->order("g.datec","DESC");
-$sql.= $db->limit($max);
+$sql.= $db->plimit($max);
 
 $resql=$db->query($sql);
 if ($resql)
-- 
GitLab