[Dbix-class] Hi All, First Question

tiziano at e-tip.net tiziano at e-tip.net
Tue Oct 17 19:07:50 CEST 2006


Hi All,
've got a table, called estimate,containing 4 fields : id, ref, revision,
status.
id is the primary key,
ref is the number of the estimate in format (number/year)
revision is a int that specifies the revision of the estimate.
Now... in table can be more than one rows with same ref but several
revision numbers
I've done something like resultset({ %search },{ group_by => [qw /ref /]}
but in some cases this give me back the row with the lowest id for that
group.
Example:
1,1/2006,0,0  <--- this is the row returned by the query
2,1/2006,1,0
3,1/2006,3,0
4,1/2006,4,0

but... i need the one with id = 4
Any help on doing it?
Thanks in advance
Tiziano






More information about the Dbix-class mailing list