Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^2: Help with MySQL SELECT into multidimensional arrayby btongeorge (Initiate) |
on Dec 02, 2011 at 09:30 UTC ( [id://941273]=note: print w/replies, xml ) | Need Help?? |
Thanks to everyone for their suggestions. Let me provide some more info. The first query looks like this: SELECT c2.id, c2.name as 'client' FROM client c2 WHERE level = 50 and status = 1; This will produce a list of clients with a unique ID in the first column. The subsequent queries will create values for *some* of the clients, although all will have at least one value in one of the queries. An example of a subsequent query is this: SELECT c2,id, c2.name as 'client', count(*) as 'vm' FROM extension ext, client c1, client c2, extension_prefs exp WHERE ext.client_id = c1.id AND c1.level=100 AND exp.param="voicemail" AND exp.value=1 AND c1.parent_client_id = c2.id AND exp.extension_id = ext.id GROUP BY c2.name; The resulting data set will indeed be a 2D structure resembling a spreadsheet. Once I have all the data compiled, I will need to generate an email (have done at least this part before in Perl) and send the data as an HTML table.
In Section
Seekers of Perl Wisdom
|
|