Select mysql GROUP BY

0

Good morning Friends. I am having a problem in a select in mysql with group by. I have a betting system that generates the post in arrays by recording in the bank each of the odds bet that generates a coupon code q. MY DOUBT IS. How do I get a single record from this group of the same code?

    
asked by anonymous 03.07.2016 / 15:05

1 answer

0

If I understood correctly, you can do so "SELECT * FROM bet WHERE code = XX LIMIT 1" Here and; and it will return a bet from those with the same code, but I do not understand if there is going to be one more condition.

    
03.07.2016 / 15:16