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. 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].*' 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
Archived
This topic is now archived and is closed to further replies.