0

I have a database and the following php code:

$result = mysqli_query($link, 'SELECT * FROM database ORDER BY Score DESC');
while ($row = $result->fetch_assoc()) {
   printf ("%s;%s\n", $row["Name"], $row["Score"]);
}

The database has rows Name as string and Score also as a string.

The Problem is the Score is not sorted correctly. Why?

Chris Haas
  • 53,986
  • 12
  • 141
  • 274

1 Answers1

0

change score column type to int

M6R7M
  • 1
  • 3