1
votes

I'm fairly new to Expression Engine and I feel this is a really simple question, I just can't find a straight-forward answer from the documentation.

I have a list of restaurants and an alphabetized menu (A B C D etc...)

I want to search only he listings that start with the letter "A".

In a tradiational MySQL search that's be WHERE Title LIKE 'A%'

Any ideas?

2

2 Answers

2
votes

I do not believe the Channel Entries module's search parameter allows LIKE matching.

You'll save time by grabbing the Low Alphabet module in this specific case for sure.

0
votes

Expression Engine doesn't have an exact "LIKE" option but they do have something similar.

I can search a field to see if it "contains" a string but there isn't anything specifically to determine if it starts with or ends with a specific string (such as would be easily available in MySQL).

I ended up doing the "contains" search parameter and then excluded any results within the exp:channel:entries looping that didn't match my exact criteria.