Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Keyword search

Quote Reply
Keyword search
Hi
I really need some documentation for DB Sql 2. I am sure it is very flexible but my brain is not up to the demand.

Please what is wrong with this search form
Code:
<form name="myform" action="db.cgi" method="get">
<input type=hidden name="db" value="<%db%>">
<input type=hidden name="do" value="search_results">
<table border=0 cellpadding=0 cellspacing=0 width=100% height=100%>
<tr><td valign=top align=center>
<table border=0 cellpadding=5 cellspacing=3 valign=top>
<tr><td align=right><input type=submit name=dd value="dd">
<input name="Keywords" size=15><br>

<input type=hidden name="Keywords-opt" value="LIKE">
</td></tr>
</table>
</td></tr>
</table>
</form>

I can't get it to work. It returns a error SRC_FAILURE and the search_form/Search_option template. When I do the same search from here it returns search_results page but it finds every record in my database and not the ones I am searching.

What I am trying to do is. On every page I want a search field searching ca. 5 of my databases 15 fields. It will return a search_results page with a list of the articles with link to the full article.

On a separate page I want a search option with the possibility to search some specific fields in my database.

I have been trying to use the templates from the image_gallery but have not succeeded.

I have also tried to search the forum but no results here. Or in an other way - a lot of hints and ideas but nothing clear enough for me to use.

Any advise or link to a forum message on the subject will be recieved with SmileSmileSmileSmileWink

Niels
Quote Reply
Re: [nielsp] Keyword search In reply to
Is 'Keywords' a field name? if not, you need to change the HTML code like:

<form name="myform" action="db.cgi" method="get">
<input type=hidden name="db" value="<%db%>">
<input type=hidden name="do" value="search_results">
<table border=0 cellpadding=0 cellspacing=0 width=100% height=100%>
<tr><td valign=top align=center>
<table border=0 cellpadding=5 cellspacing=3 valign=top>
<tr><td align=right><input type=submit name=dd value="Submit">
<input name="keyword" size=15><br>
</td></tr>
</table>
</td></tr>
</table>
</form>

Hope that helps.

TheStone.

B.