I'm having a devil of a time with a mysql (v3.23) query and was hoping
someone here could give me a hand.
I have a fantasy football project I'm working on and I allow registered
users to pick a lineup every week and then I score them at the end of the
week depending on how well their players do. Every time they make a change
to their lineup, I update the database, but the lineup isn't "official"
until they submit a final version. Thus, for any given week I have multiple
lineups from each user, but only the last one submitted (indicated by a
timestamp on the table) is the official version.
The table looks something like this:
user lineupId QB RB WR TE K DEF submitted
ts
1 1 vickm1 1
200406160800
1 2 vickm1 mossr1 1
200406160805
2 3 bledsd1 westbb1 jurevj1 alexas1 dawsop1 JAX 1
200406160806
1 4 vickm1 anderd1 bostod1 riemej1 linder2 KC 1
200406160810
2 5 bledsd1 westbb1 jurevj1 alexas1 dawsop1 CIN 0
200406160815
What I would like returned is this:
user lineupId QB RB WR TE K DEF submitted
ts
2 3 bledsd1 westbb1 jurevj1 alexas1 dawsop1 JAX 1
200406160806
1 4 vickm1 anderd1 bostod1 riemej1 linder2 KC 1
200406160810
THANKS!!!
Ryan Hagan
ph: 540-731-3588
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

