Good day! I have a problem with the withdrawal of the stamp, here's the actual request.

SELECT * FROM `turnir` ORDER BY `win` DESC LIMIT 1 

For some reason, he does not take the largest amount of win but randomly. For example, there is 1 2 3 4 5 6 7 8 9 it will not output 9 , it is even difficult to say something randomly, because this number does not change every time and remains so. What could be the problem?

  • I propose to see the result of the query without LIMIT, I think it will immediately become clear what the problem is. - IVsevolod
  • one
    Is the win field set to integer ? - Deonis
  • @ bazaev05 I meant to look at the whole picture of the request, not only the first element) - IVsevolod
  • > Field varchar (255 Here you are, my friend, and the answer to the question.)) - Deonis

1 answer 1

Changed type from VARCHAR to INT. Deonis ++