Php/MySQL: query ranges, but ignore other chars?
Posted: Thu Aug 27, 2009 12:34 pm
I have a mysql database with thousands of records, which each have an associated 'method number' ranging from 1 to 9,000. When someone clicks on the links for just the 200s, 300s, 1600s, etc. I want it to show only that grouping. BUT the problem is some the data has letters in it, like 232B, decimals, 200.1, spaces, hyphens, and other non-numerical characteristics. So, if I want to show only 200s for example, my MySQL command should search where method > 199 and <300, -BUT- ignore non-numerical characters, so it will do this:
Query 200s:
200
200A
200B
200.1
205A-modified
232B
239
290.5 C
etc
Anyone know how to get that result through a query + php?
Query 200s:
200
200A
200B
200.1
205A-modified
232B
239
290.5 C
etc
Anyone know how to get that result through a query + php?