projects
/
google-map-tiles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d1955f
)
create geo_count table with point for lookup
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 3 Apr 2011 16:43:10 +0000
(18:43 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 3 Apr 2011 16:43:47 +0000
(18:43 +0200)
koha-import.pl
patch
|
blob
|
history
diff --git
a/koha-import.pl
b/koha-import.pl
index
6729adc
..
5a1921f
100755
(executable)
--- a/
koha-import.pl
+++ b/
koha-import.pl
@@
-166,3
+166,19
@@
while( my $row = $sth->fetchrow_hashref ) {
, dump($location)
);
}
+
+eval { $g_dbh->do(qq{ drop table geo_count }) };
+$g_dbh->do(qq{
+
+select
+ count(biblionumber)
+ ,point(avg(lat),avg(lng))
+ ,geo_city.city
+ ,min(country) as country
+into geo_count
+from geo_biblioitems
+join geo_city on city_koha = geo_biblioitems.city
+group by geo_city.city
+order by count(biblionumber) desc
+
+});