If I run this:
ALTER TABLE `equipos11a12` ORDER BY `ID`
It only happens one time. If I change the ids, it wont change in ascending order.
I have to run the alter table everytime in order for the ids to order.
Here is my php code:
$query = "SELECT * FROM equipos11a12";
$result = mysql_query($query); ?>
while($person = mysql_fetch_array($result)) {
echo " " . $person ["name"] . " ";
You must add the order by clause to your select query :
$query = "SELECT * FROM equipos11a12 ORDER BY `ID` ASC"; // ascending order
$query = "SELECT * FROM equipos11a12 ORDER BY `ID` DESC"; // descending order
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With