Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

Re: What I Will Need Links SQL to Do

Quote Reply
Re: What I Will Need Links SQL to Do In reply to
About the different "databases"...you should just create additional tables within the Links SQL database that you are using. And you would not really have to use separate copies of search.cgi. Also, you will have to add additional .def files for the other tables. Now in terms of indexing these tables, you will have to add some index codes to the SQL.mysql file and also create the tables via the setup.cgi script.

Just add some parameters and conditional statements in the sub search routine, like the following:

Code:

# Now let's search the links table, but first figure out any filters.
if ($in->param('SearchMode') eq 'BibleSearch') {
$linkdb = new Links::DBSQL "$LINKS{admin_root_path}/defs/Bible.def";
}
if ($in->param('SearchMode') eq 'MusicSearch') {
$linkdb = new Links::DBSQL "$LINKS{admin_root_path}/defs/Music.def";
}
if ($in->param('SearchMode') eq 'LinksSearch') {
$linkdb = new Links::DBSQL "$LINKS {admin_root_path}/defs/Links.def";
}


Then in your search form codes, add the following radio buttons:

Code:

<input type="radio" name="SearchMode" value="BibleSearch"> Bible
<input type="radio" name="SearchMode" value="LinkSearch" CHECKED> Links
<input type="radio" name="SearchMode" value="MusicSearch"> Music


OR a drop-down menu:

Code:

<select name="SearchMode" size="1">
<option value="BibleSearch"> Bible</option>
<option value="LinksSearch" SELECTED> Links</option>
<option value="MusicSearch"> Music</option>
</select>


Regards,

Eliot Lee

Subject Author Views Date
Thread What I Will Need Links SQL to Do OneDanShow 6581 Jul 22, 2000, 8:32 AM
Thread Re: What I Will Need Links SQL to Do
Stealth 6500 Jul 22, 2000, 11:54 AM
Thread Re: What I Will Need Links SQL to Do
OneDanShow 6392 Jul 28, 2000, 5:38 PM
Post Re: What I Will Need Links SQL to Do
pugdog 6377 Jul 29, 2000, 9:24 PM
Thread Re: What I Will Need Links SQL to Do
jsu 6374 Jul 29, 2000, 9:41 PM
Thread Re: What I Will Need Links SQL to Do
OneDanShow 6325 Aug 6, 2000, 5:57 PM
Post Re: What I Will Need Links SQL to Do
Stealth 6330 Aug 6, 2000, 6:20 PM
Thread Re: What I Will Need Links SQL to Do
OneDanShow 6301 Aug 10, 2000, 2:11 PM
Post Re: What I Will Need Links SQL to Do
Stealth 6286 Aug 10, 2000, 9:02 PM