Mercurial > eagle-eye
view ally.pl @ 374:e551351b18de
updated for timestamp of scores information
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Tue, 14 Apr 2009 17:01:17 +0800 |
parents | dd3d76f43999 |
children |
line wrap: on
line source
#!/usr/bin/perl use strict; use Ikariam; use Data::Dumper; use List::Util qw[min max]; package main; # my $users = Ikariam::User->search(ally => 'WMeMe'); Ikariam::Cities->set_sql(ally => qq { SELECT cities.cityId FROM cities WHERE cities.ally == ? }); Ikariam::Island->has_many(cities => 'Ikariam::Cities'); Ikariam::Island->set_sql(ally => qq { SELECT island.id FROM island, cities WHERE cities.island == island.id AND cities.ally == ? }); die("Usage: $0\nUsage: $0 ally\n") unless ($#ARGV == 0); my @cities = Ikariam::Cities->search_ally($ARGV[0]); print Dumper(@cities);