I am currently working on a project and I had one quick question that I could not figure out.
I am trying to actually pull data out of mySQL by the first letter:
Example:
#-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z
I have the query for the letters as :
$query = "SELECT * FROM table WHERE column like '".$start."%'";
Where start is the variable letter : A, B, C etc.
Now I am not sure how exactly to pull data out by numbers.. I really do not want to set multiple query's to :
$query = "SELECT FROM table WHERE column like '1%';
$query = "SELECT FROM table WHERE column like '2%';
Etc.
Is there an easier way to just pull data out of mySQL if it starts with a number, anywhere from 0-9 ? I am sure there is.. Can you please help me.. I have used the OR clause but I have had no success.. I did read few articles on it as well....
Best Regards,
-DigitalSolution