Downloads ADV Statistics returns SQL errors - Bugs
Bug ID
40
Software
Icy Phoenix 1.3
PHP Version
PHP 5.x
DB Version
MySQL 5.x
Category
PHP
Title
Downloads ADV Statistics returns SQL errors
Description
Hi all,
I've added some "." (full stop) to "ip_root/includes/downloads/includes/dl_stats.php" because it returns some SQL errors "unexpected T_CONSTANT_ENCAPSED_STRING...".

This is one of the faulty SQL query (lines 363 to 371]:
Code: [Hide]
  1. $sql = "SELECT count(s.id) as dl_counts, s.user_id, s.username, u.username as user_username, u.user_active, u.user_color  
  2. FROM " . DL_STATS_TABLE . " s, " . USERS_TABLE " u  
  3. WHERE s.direction = 0  
  4. AND s.cat_id IN (" . implode(',', $access_cats) . ")  
  5. $sql_where  
  6. AND u.user_id = s.user_id  
  7. GROUP BY s.user_id, user_username  
  8. ORDER BY dl_counts DESC  
  9. LIMIT 10"; 


That I changed in:

Code: [Hide]
  1. $sql = "SELECT count(s.id) as dl_counts, s.user_id, s.username, u.username as user_username, u.user_active, u.user_color  
  2. FROM " . DL_STATS_TABLE . " s, " . USERS_TABLE . " u  
  3. WHERE s.direction = 0  
  4. AND s.cat_id IN (" . implode(',', $access_cats) . ")  
  5. $sql_where  
  6. AND u.user_id = s.user_id  
  7. GROUP BY s.user_id, user_username  
  8. ORDER BY dl_counts DESC  
  9. LIMIT 10"; 


The "." (full stop) to add is the one near "USERS_TABLES".

All the query after this one are affected by the same bug, so you have to add other "." on lines 408, 453 and 497 always after "USERS_TABLES".
Reply
Fixed
Priority
Low
Status
Fixed
Assigned To
Fixed
Yes
Submission
Sun 18 Oct, 2009 18:54
Bug Poster
Last Update
Wed 21 Oct, 2009 00:35
Bug Last Poster
  
   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.1495s (PHP: 13% SQL: 87%)
SQL queries: 12 - Debug Off - GZIP Enabled