Reputation: 245
I made a dropdown menu and tried to list it. But the list in the db doesn't start with "H01" so my dropdown starts with "H40"
How can I replace the code:
like 'H%'
Upvotes: 0
Views: 64
Reputation: 21
You need to add order_by to your select query.
For example
<?php
$query = "SELECT * FROM `status` ORDER BY `status`.`status` ASC";
?>
Here status field has values like H01, H02, H03, ... H10
Upvotes: 0