I have this code
$link = new mysqli('localhost', 'root', '', 'domaci2');
$query = 'SELECT * FROM utisci';
$result = $link->query($query);
while ($row=$result->fetch_assoc()){
$link->query('SELECT pk FROM utisci ORDER BY ocena DESC');
}
$result->free();
mysqli_close($link);
It is very simple, i am just trying to sort my table but it is not working.
Extra info:
- pk variable is the primary key of table
- ocena variable is integer