exhaler Posted February 3, 2009 Share Posted February 3, 2009 hi, newbei here. just a quick question. i have a database filled with names and created a php page that displays them according to letter asc. for example hyperlink for letter A is <a href = "listrestaurant.php?letter=A"> also in php i use this command to fetch all the names that start with A "SELECT * FROM restaurant WHERE name LIKE'{$letter}% ORDER BY name ASC "; this works fine if the name begins with a letter but some names begin with a number, how can i create a page to show only the names that start with a number if i click on a link <a href = "listrestaurant.php?letter=#"> thx Link to comment https://forums.phpfreaks.com/topic/143616-order-results-by-name-if-name-contains-numbers/ Share on other sites More sharing options...
sasa Posted February 3, 2009 Share Posted February 3, 2009 WHERE name<'A' Link to comment https://forums.phpfreaks.com/topic/143616-order-results-by-name-if-name-contains-numbers/#findComment-753508 Share on other sites More sharing options...
exhaler Posted February 3, 2009 Author Share Posted February 3, 2009 thx that worked perfectly Link to comment https://forums.phpfreaks.com/topic/143616-order-results-by-name-if-name-contains-numbers/#findComment-753543 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.