svgmx5 Posted May 29, 2011 Share Posted May 29, 2011 Does anyone have an example or can help me figure out how i can display results from the database only if they start with numbers? for example i have numerous items stored and some don't have any numeric values but others do start with a number value rather than a alphabetical value. Right now i can retrieve them based on the letter they start with so if i want to display all items that start with an 'A' i can do so. but if i want to display all items that start with any number or non alphabetical value i can't retrieve them. Hope someone can help me out. Quote Link to comment https://forums.phpfreaks.com/topic/237783-displaying-items-that-start-with-a-number-from-the-database/ Share on other sites More sharing options...
.josh Posted May 29, 2011 Share Posted May 29, 2011 starts with a number: SELECT column FROM table WHERE column REGEXP '^[0-9].*' starts with any non-alphabetical SELECT column FROM table WHERE column REGEXP '^[^a-zA-Z].*' Quote Link to comment https://forums.phpfreaks.com/topic/237783-displaying-items-that-start-with-a-number-from-the-database/#findComment-1221913 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.