R
Remco Swoany
Hi,
newbie question(i guess)
a = Bookings.find
all, :conditions => [3.days.ago])
a = [id : 1, departure : 'AMS', arrival => 'NY'],[id : 2, departure :
'AMS', arrival => 'BCN'],[id : 3, departure : 'AMS', arrival =>
'BKK'],[id : 4, departure : 'AMS', arrival => 'BKK'] ect.
The value of the key departure and arrival is dynamic based on
table(3000 combinations) and the bookings
I want to find the bookings and count the arrival and departure(s). I
the case of the code above, i want the following output.
departure = AMS > total = 5
arrival = BCN > total = 1
arrival = NY > total = 1
arrival = BKK > total = 2
How can i do this
Grtz..remco
newbie question(i guess)
a = Bookings.find
a = [id : 1, departure : 'AMS', arrival => 'NY'],[id : 2, departure :
'AMS', arrival => 'BCN'],[id : 3, departure : 'AMS', arrival =>
'BKK'],[id : 4, departure : 'AMS', arrival => 'BKK'] ect.
The value of the key departure and arrival is dynamic based on
table(3000 combinations) and the bookings
I want to find the bookings and count the arrival and departure(s). I
the case of the code above, i want the following output.
departure = AMS > total = 5
arrival = BCN > total = 1
arrival = NY > total = 1
arrival = BKK > total = 2
How can i do this
Grtz..remco