Commit f1df107a authored by sylvieg's avatar sylvieg

getOne call

parent abab9d17
......@@ -43,9 +43,7 @@ class StatsLib extends TikiLib {
$query = "select pageName, hits, length(data) as len ,lastModif, user, ip, comment, version, flag from tiki_pages $mid order by $sort_mode limit 0,-1";
$query_cant = "select count(*) from tiki_pages $mid";
$result = $this->query($query);
$result_cant = $this->query($query_cant);
$res2 = $result_cant->fetchRow();
$cant = $res2[0];
$cant = $this->getOne($query_cant);
$ret = Array();
$num_or = 0;
while($res = $result->fetchRow(DB_FETCHMODE_ASSOC)) {
......
......@@ -1661,9 +1661,7 @@ class TikiLib {
$query = "select * from `tiki_file_galleries` where `visible`='y' $whuser order by $sort_mode limit $offset,$maxRecords";
$query_cant = "select count(*) from `tiki_file_galleries` where `visible`='y' $whuser";
$result = $this->query($query);
$result_cant = $this->query($query_cant);
$res2 = $result_cant->fetchRow();
$cant = $res2[0];
$cant = $this->getOne($query_cant);
$ret = Array();
while($res = $result->fetchRow()) {
$aux = Array();
......@@ -2512,9 +2510,7 @@ class TikiLib {
$query = "select * from `tiki_galleries` where `visible`='y' $whuser order by $sort_mode limit $offset,$maxRecords";
$query_cant = "select count(*) from `tiki_galleries` where `visible`='y' $whuser";
$result = $this->query($query);
$result_cant = $this->query($query_cant);
$res2 = $result_cant->fetchRow();
$cant = $res2[0];
$cant = $this->getOne($query_cant);
$ret = Array();
while($res = $result->fetchRow()) {
$aux = Array();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment