Will do mike …
Heres my table …
CREATE TABLE wireless (
id int(10) unsigned NOT NULL auto_increment,
NetType text default NULL,
ESSID text default NULL,
BSSID text default NULL,
Info text default NULL,
Channel int(2) unsigned NULL,
Cloaked text default NULL,
Encryption text default NULL,
MaxRate int(5) unsigned NULL,
Carrier text default NULL,
BestSignal int(5) unsigned NULL,
BestQuality int(5) unsigned NULL,
GPSMinLat float NULL,
GPSMaxLat float NULL,
GPSMinLon float NULL,
GPSMaxLon float NULL,
GPSBestLat float NULL,
GPSBestLon float NULL,
PRIMARY KEY (id)
);
Heres some sample data]
23, '', '3Com', '00:0F:CB:9F:DB:96', '', 11, 'No', 'WEP,TKIP,WPA', 11, '', 0, 0, 53.3763, 53.3776, -6.22557, -6.22485, 0, 0
24, '', 'Home', '00:13:49:A8:36:13', '', 11, 'No', 'None', 22, '', 0, 0, 53.3761, 53.3777, -6.22559, -6.22491, 0, 0
25, '', 'linksys', '00:0F:CC:25:BE:80', '', 7, 'No', 'WEP', 22, '', 0, 0, 53.3775, 53.3775, -6.22491, -6.22485, 0, 0
I have Encryption types of WEP, None and ‘WEP,TKIP,WPA’.
I want to create a pie chart that will show what percentage of the results have WEP, None and ‘WEP,TKIP,WPA’.
When I run the manual sql query for each encryption type I get the following values:
SELECT count(*) FROM wireless w where Encryption = "WEP";
Value: 1900
SELECT count(*) FROM wireless w where Encryption = "None";
Value: 795
SELECT count(*) FROM wireless w where Encryption like "%WPA%";
Value: 448
My pie chart should have 3 segments, one to represent each of the values above and if possible to have a legend that shows which each segment represents.
Regards,
Ronan