Gossamer Forum
Home : Products : DBMan : Customization :

Searching "dis"order

Quote Reply
Searching "dis"order
I know there is a lot of previous postings regarding the view_search subroutine and I've read through them all.

Here's my problem. I've use the alphabetical list mod that places the letters in brackets above the record_form in the
subroutine view_search. This produces a link to easily search on each letter for LASTNAME (Last). Here is an example of the link generated:
<a href="$db_dir_url/cgi-bin/db.cgi?db=db&uid=default&Last=A&mh=25&so=asc&cs=1&view_records=1">A</a>

Problem: The results lists not only the Last Names starting with "A" but ALL Last Names that contain an "A" or "a".

I want the result to only list those Last Names that START with "A". Any help would be appreciated and if this "dis"order has been previously resolved here - my apoliogies just point me to the thread.

TIA



Quote Reply
Re: Searching "dis"order In reply to
From my understanding of special symbols in perl I think you need to use the ^ symbol, which means the first letter must begin with...

So your code:
<a href="$db_dir_url/cgi-bin/db.cgi?db=db&uid=default&Last=^A&mh=25&so=asc&cs=1&re=1&view_records=1">A</a>

you may also need the re=1 for regular expression but I'm not sure.

Trev

Quote Reply
Re: Searching "dis"order In reply to
Actually it is re=on.

Want to see an example???

Go to:

http://www.coco.cc.az.us/...10sb=0&so=ascend

See the &re=on!

Regards,

Eliot Lee
Quote Reply
Re: Searching "dis"order In reply to
As you so often suggest to others, try searching for re=1

BOTH OF THEM WORK

Regards,

Trev