Gossamer Forum
Home : Products : DBMan SQL : Development, Plugins and Globals :

Getting lettersearch to work for Modify & Delete templates

Quote Reply
Getting lettersearch to work for Modify & Delete templates
I have installed the Wordsearch plugin, and have been able to get a listing working so they can view the database entries by first letter:

A B C D E etc

That they can click on to see all entries starting with A, or B, etc. Currently I have this setup:

<%if admin_p%>
<a href="db.cgi?do=search_results&db=jdamembers&<%ifnot use_cookie%>sid=<%session_id%><%endif%>&ls=Z&col=Company_Name&sb=Company_Name">Z</a>
<a href="db.cgi?do=search_results&db=jdamembers&uid=default&ls=A&col=Company_Name&sb=Company_Name">A</a>

There are two issues I am trying to resolve:

1) I have three types of users that need the letter search to work, while still being able to continue working as they are, so I need it to recognize which each user is: the default viewer who is not logged in, a base user logging in to modify their database entry, an admin who is logging in to check/modify all entries. I have it able to recognize the default and the admin right now...but how do I get it to recognize a base user who is logged in?

2) I want to put these same letter searches on the Modify and Delete areas (modify_search_results and delete_search_results). But currently, when I use the same code above that has worked, I get a "You must specify at least one search term." It does not seem to accept the ls=A as a search term. Works when I use keyword=whatever. What do I need to do to make the letter search work for the modify and delete search results?

Hope someone has an answer, and that I am just missing something simple. Thanks!

(whoops, I should add that I can get the lettersearch to work fine in the modify_search_results or delete_search_results if I have it use the do=search_results&uid=default, it just logs you out when you click on it, and only shows the record. Does not allow you to list all records beginning with, say, A, with the check box to modify/delete next to each)

Last edited by:

Aberavon: Mar 13, 2003, 2:46 AM