Jump to content

Order results by name if name contains numbers


exhaler

Recommended Posts

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

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.