Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue May 11, 2004 2:08 am |
You would want to use the %query function to search the DB. Then you would have to get all the records and place the appropiate field into another list for use with %pick. Finally you match the selection with the original query and fetch that record for display with #SHOWDB or #SHOW %expanddb
An example alias of this would be:
#ALIAS SearchDB {DBQuery=%query(%pos("%1",&Keyword));#IF (@DBQuery) {#IF (%numitems(@DBQuery)>1) {DBPick="";#FORALL @DBQuery {#DBGET %i;#ADDITEM DBPick {&Name}};DBUser=%pick("p:Select name","o:1",@DBPick);#DBGET %item(@DBQuery,%ismember(@DBUser,@DBPick))} {#DBGET @DBQuery};#SHOWDB %rec} {#ECHO No such record found}} |
|