/[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 1229 - (hide annotations)
Sat Jun 13 16:12:23 2009 UTC (15 years ago) by dpavlin
File size: 397 byte(s)
small Protovis example

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     select sum(ttc),ca from citirani group by ca order by sum desc ;
15     });
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