Gossamer Forum
Home : Products : DBMan : Customization :

ww=on flag just for one field

Quote Reply
ww=on flag just for one field
In my site the user can search the database either with photo nr or with keywords. When I set the ww=on in the form. The keyword search does not work correctly. On the other hand when there is no ww=on in the form the dbman engine returns photos number 5, 15, 50 etc. for the "5" search in photo nr field.

Can we make something like that: If in the search form the photo nr field is not empty then do a ww=on search. But if it is emtpy set ww=off?

Thanks

Quote Reply
Re: ww=on flag just for one field In reply to
I would have to think about this for a bit...but you would have to edit the sub query routine in the db.cgi file to make this work.

Regards,

Eliot Lee
Quote Reply
Re: ww=on flag just for one field In reply to
In db.cgi, sub query, after

local (%sortby);

add

Code:

if $in{'Photo Number'} {
$in{'ww'} = 1;
}
Be sure to change Photo Number to the actual name of your field.

JPD