Answer the question
In order to leave comments, you need to log in
Extracting records from a table with sorting?
How to display records not in order, but by rank value.
For example, there are 3 products, A has rank = 20, B = 10, and C = 40.
It needs to be displayed in ascending order in this case: B, A, B
Here is what is:
$sql = $mysqli->query("SELECT * FROM goods");
foreach ($sql as $item) {
echo $item["name"];
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question