Forum Moderators: coopster
Lets say I have an x amount of file names in a database and I just want to fetch all those that begin with the letter 'a', is that possible? I know I can fetch the whole set in alphabetical order, but what if I want to restrict it to a certain letter?
All the file names are lower case, so capital letters won`t be necessary.
Thanks. :)
SELECT filename FROM table
$var = substr($row['filename'], 0, 1);
if ($var=="a")
do something
else if ($var == "b")
do something else
Or is there a better way?