Skip to content

Commit

Permalink
Closes #4 (Sort comuni by name).
Browse files Browse the repository at this point in the history
  • Loading branch information
etj committed Jan 22, 2013
1 parent 6fee9d0 commit 08e82cf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ public Element exec(Element params, ServiceContext context) throws Exception
} catch (NumberFormatException e) {
throw new BadParameterEx("provId", provId);
}
response = dbms.select("select c.* from comuni c, province p where p.id=? and p.code=c.provCode", id);
response = dbms.select("select c.* from comuni c, province p where p.id=? and p.code=c.provCode order by c.label", id);
} else if (provCode != null) {
response = dbms.select("select * from comuni where provCode=?", provCode);
response = dbms.select("select * from comuni where provCode=? order by label", provCode);
} else if (provName != null) {
response = dbms.select("select c.* from comuni c, province p where p.label=? and p.code=c.provCode", provName);
response = dbms.select("select c.* from comuni c, province p where p.label=? and p.code=c.provCode order by c.label", provName);
} else {
throw new IllegalStateException();
}
Expand Down

0 comments on commit 08e82cf

Please sign in to comment.