/[webpac2]/trunk/vhost/dipl/data.cgi
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/vhost/dipl/data.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1233 - (hide annotations)
Fri Jul 10 13:52:57 2009 UTC (14 years, 11 months ago) by dpavlin
File size: 408 byte(s)
added barchart to protovis

1 dpavlin 1229 #!/usr/bin/perl
2    
3     use warnings;
4     use strict;
5    
6     use JSON;
7     use DBI;
8    
9     print "Content-type: text/javascript\n\r\n\r";
10    
11     my $dbh = DBI->connect('dbi:Pg:dbname=dipl','dpavlin','', { RaiseError => 1, AutoCommit => 0 });
12    
13     my $data = $dbh->selectall_arrayref(q{
14 dpavlin 1233 select sum(ttc),ca,count(ca) from citirani group by ca order by count asc ;
15 dpavlin 1229 });
16     print "var data = ",to_json(
17     # [ map { $_->[0] } @$data ]
18     $data
19     ),";\n\r";

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26