Open-AudIT

What's on your network?
It is currently Sun Apr 22, 2018 10:45 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 
Author Message
 Post subject: matze - Sort Error
PostPosted: Wed Aug 16, 2006 2:10 am 
Offline
Contributor

Joined: Thu Jul 13, 2006 7:54 am
Posts: 156
oa/array/list.php?view=statistic_memory

The list showed up when i first went to the page, but once i click physical memory to sort by that i got this

"SELECT system_memory, COUNT(*) count_item, ( 100 / (SELECT count(*) FROM system WHERE system_memory != '') * COUNT( * ) ) AS percentage FROM system AND ( 1 ) GROUP BY system_memory ORDER BY system_memory ASC LIMIT 0,30"

and nothing showed up.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 16, 2006 2:12 am 
Offline
Contributor

Joined: Thu Jul 13, 2006 7:54 am
Posts: 156
Same with the IE Version page.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 16, 2006 2:28 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Same here,

SELECT system_os_name, COUNT( system_uuid ) AS count_item, ( 100 / (SELECT count(system_uuid) FROM system WHERE system_os_name != '') * COUNT( system_uuid ) ) AS percentage FROM system AND ( 1 ) GROUP BY system_os_name ORDER BY system_os_name ASC LIMIT 0,30
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\openaudit\list.php on line 85

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\openaudit\list.php on line 90


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 17, 2006 8:27 am 
Offline
Moderator

Joined: Sun Aug 06, 2006 1:13 am
Posts: 362
Location: Germany
Are you all using Mysql > 4.1?

The Querys used Subselects, which where implementet in MySQL > 4.1.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 17, 2006 6:14 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Yes I am.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 17, 2006 6:29 pm 
Offline
Moderator

Joined: Sun Aug 06, 2006 1:13 am
Posts: 362
Location: Germany
I'm using MySQL 4.1.14-nt from Xampp at Windows XP and it works fine. I had implement an error-reporting in list.php the branche. Could you post the message?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 17, 2006 6:56 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Fatal Error:

SELECT system_os_name, COUNT( system_uuid ) AS count_item, ( 100 / (SELECT count(system_uuid) FROM system WHERE system_os_name != '') * COUNT( system_uuid ) ) AS percentage FROM system AND ( 1 ) GROUP BY system_os_name ORDER BY count_item ASC LIMIT 0,30

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND ( 1 ) GROUP BY system_os_name ORDER BY count_item ASC LIMIT 0,30' at line 7

When I try and sort the Statistics by operating system by count (for example).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 18, 2006 2:12 am 
Offline
Moderator

Joined: Sun Aug 06, 2006 1:13 am
Posts: 362
Location: Germany
I've fixed this error.

FROM system AND ( 1 ) ---> FROM system WHERE (1) AND ( 1 )


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 18, 2006 3:36 am 
It is still broken if you enter a search term for either count or percentage.


Top
  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 18, 2006 3:55 am 
Offline
Moderator

Joined: Sat Mar 04, 2006 2:44 am
Posts: 193
Needs to be a HAVING not a WHERE when filtering by grouped data.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group