1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

query help

Discussion in 'Databases' started by decepti0n, Mar 31, 2008.

  1. #1
    How can I do this:

    - 2 Tables - guesses and games
    - guesses.movieid matches games.gid
    - I need the latest ten games, plus the latest matching guess

    SELECT * FROM `games` LEFT JOIN guesses ON games.gid = guesses.movieid GROUP BY gid order by `gid` desc
    Code (markup):
    Thats all i have so far and it semi works - it just doesn't get the latest guess, it gets the first one. Is there a way to order the guesses table descendingly? Would be good

    Thanks for any help
     
    decepti0n, Mar 31, 2008 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    Remove GROUP BY
     
    mwasif, Mar 31, 2008 IP