diff options
author | z0rglub <z0rglub@piwigo.org> | 2004-10-30 15:42:29 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2004-10-30 15:42:29 +0000 |
commit | 7cd9b65e3299fb8bc6a83e65f89fcecca62f3178 (patch) | |
tree | e068090892b16db654a2bf0c2886b65eaf44a14f /admin/stats.php | |
parent | 3730c810f254267ab1fb49f4cad55866e780ad6e (diff) |
- function mysql_query replaced by pwg_query : the same with debugging
features
- by default, DEBUG is set to 0 (off)
git-svn-id: http://piwigo.org/svn/trunk@587 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/stats.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/admin/stats.php b/admin/stats.php index 4d916009a..6a2dae892 100644 --- a/admin/stats.php +++ b/admin/stats.php @@ -52,7 +52,7 @@ $query = "SELECT DISTINCT COUNT(*) as p, YEAR(date) as y FROM phpwg_history GROUP BY DATE_FORMAT(date,'%Y-%m') DESC;"; -$result = mysql_query( $query ); +$result = pwg_query( $query ); $i=0; while ( $row = mysql_fetch_array( $result ) ) { @@ -66,14 +66,14 @@ while ( $row = mysql_fetch_array( $result ) ) WHERE DATE_FORMAT(date,'%Y-%m') = '$current_month' AND FILE = 'picture' GROUP BY FILE;"; - $pictures = mysql_fetch_array(mysql_query( $query )); + $pictures = mysql_fetch_array(pwg_query( $query )); // Number of different visitors $query = "SELECT COUNT(*) as p, login FROM phpwg_history WHERE DATE_FORMAT(date,'%Y-%m') = '$current_month' GROUP BY login, IP;"; - $user_results = mysql_query( $query ); + $user_results = pwg_query( $query ); $nb_visitors = 0; $auth_users = array(); while ( $user_array = mysql_fetch_array( $user_results ) ) @@ -112,7 +112,7 @@ $endtime = mktime( 23,59,59,date('n'),date('j'),date('Y') ); $query.= ' AND date < '.$endtime; $query.= ' ORDER BY date DESC'; $query.= ';'; - $result = mysql_query( $query ); + $result = pwg_query( $query ); $nb_pages_seen = mysql_num_rows( $result ); $day['nb_pages_seen'] = $nb_pages_seen; if ( $nb_pages_seen > $max_pages_seen ) $max_pages_seen = $nb_pages_seen; |