Topic: Search by First Letter

Hi guys,

When i search for an A at firstname i will get a full list of people that have an A in there name. Like Annabal, Danny, Elizabeth.

I just want a list of people that got an A as first letter of there name. So i want Annabel and not Danny and Elizabeth. Got my point?

Is there a way to fix this?

Greetings, Dennis

Re: Search by First Letter

Dennis, this feature is built in but searches alphabetically by last name. If you'd like you can change the alpha search to search by first name by changing line 203 of file /class/members.php from:

$this->q .= " and c.meta_key = 'last_name' and SUBSTRING(LOWER(c.meta_value),1,1) = '$this->query' ";

to:

$this->q .= " and c.meta_key = 'first_name' and SUBSTRING(LOWER(c.meta_value),1,1) = '$this->query' ";

Re: Search by First Letter

Thx for the reply Ternform

The alpha search just works great for last name. Its just when you search on an e or n you will get too many results. I just want to show the people that got an e or n in the firstletter of their name.

Any possible fixes that i can make?

Greetings Dennis

Re: Search by First Letter

Depending on your knowledge of PHP and SQL this may not be an easy task for you. If you need the last name alpha search there probably isn't an elegant way for you to do what you're asking.