PDA

View Full Version : anyone can help me with this database search engine thingy??


sweetmess
05-07-2004, 03:06/03:06AM
i'm working on this search engine thingy and is having porblems with it. i don't know asp. only know html. so i need help with my work here! i've only done the interface but i don't know how to link them up and all. so right now, my pages don't link to each other and my search engine doesn't work. i haven't added any asp codes cause i don't know how to. anyone able to help me link up and do up the search engine? this is how it looks...

i've also attached a sample database...

searchmtd.html
--------------------
<html>
<head>
<title>Method of Search</title>
</head>
<body>
<center>
<font face="verdana">
<table width="100%">
<tr><th bgcolor="CCCCCC" colspan=2>
<h2>Select a Search Method</h2>
</th></tr>

<form name="input" action="searchmtd.html"
method="post">
<tr><td width="30%"></td><td width="70%"><br><br>
<b>i.</b> <input type="radio" name="method" value="certno.html" checked>Search by Certificate No.<br>
</td></tr>

<tr><td width="30%"></td><td width="70%"><br><br>
<b>ii.</b> <input type="radio" name="method" value="category.html">Search by Categories<br>
</td></tr>

<tr><td width="30%"></td><td width="70%"><br><br>
<b>iii.</b> <input type="radio" name="method" value="keyword.html">Search by entering Keywords
</td></tr>

<tr><td colspan=2 align="center"><br><br>
<input type="submit" value="Continue">
</td></tr>
</form>

</table>
</font>
</body>
</html>

certno.html
---------------
<html>
<head>
<title>Search by Certificate No.</title>
</head>
<body>
<center>
<font face="verdana">
<table width="100%">
<tr><th colspan=2 bgcolor="CCCCCC">
<h3>Search by Cert No.</h3>
</th></tr>

<tr>
<td colspan=2 align="center"><br><br>
Enter Certificate No.: <input type="text" size="30">
</td></tr>

<tr><td align="center"><br><br>
<input type="submit" value="Search">
</td></tr>
</table>
</font>
</body>
</html>

category.html
-----------------
<html>
<head>
<title>Search by Categories</title>
</head>
<body>
<center>
<font face="verdana">
<table width="100%">
<tr><th colspan=3 bgcolor="CCCCCC">
<h3>Search by the following categories</h3>
</th></tr>

<tr><td width="25%"></td><td width="20%"><br>Select Domain:
</td><td>
<input type="checkbox" name="SE" value="safety">Safety&nbsp
<input type="checkbox" name="WW" value="emc">EMC<br>
<input type="checkbox" name="WW" value="wired">Wired&nbsp
<input type="checkbox" name="WW" value="wireless">Wireless<br>
</td></tr>

<tr><td width="25%"></td><td colspan=2>
<form name="myform" action="" method="POST">
Please select country:
<select name="countries">
<option value="none">- None -</option>
<option value="aust">Australia</option>
<option value="bangladesh">Bangladesh</option>
<option value="brunei">Brunei</option>
<option value="cambodia">Cambodia</option>
<option value="china">China</option>
<option value="hk">Hong Kong</option>
<option value="india">India</option>
<option value="indo">Indonesia</option>
<option value="japan">Japan</option>
<option value="korea">Korea</option>
<option value="laos">Laos</option>
<option value="msia">Malaysia</option>
<option value="myanmar">Myanmar</option>
<option value="nepal">Nepal</option>
<option value="nz">New Zealand</option>
<option value="pakistan">Pakistan</option>
<option value="phili">Philippines</option>
<option value="spore">Singapore</option>
<option value="sri">Sri Lanka</option>
<option value="taiwan">Taiwan</option>
<option value="thai">Thailand</option>
<option value="viet">Vietnam</option>
</select>
</form>
</td></tr>

<tr><td width="25%"></td><td colspan=2>
Enter RMN No.: <input type="text" size="30">
</td></tr>

<tr><td width="25%"></td><td colspan=2>
Enter Part No.: <input type="text" size="30">
</td></tr>

<tr><td width="25%"></td><td colspan=2>
Enter Marketing/Product No.: <input type="text" size="30">
</td></tr>

<tr><td width="25%"></td><td colspan=2>
<form name="prod" action="" method="POST">
Please select Product Type:
<select name="prodtype">
<option value="nil">- None -</option>
<option value="desktops">Desktop</option>
<option value="workstations">Workstation</option>
<option value="notebks">Notebook</option>
<option value="tabletpc">Tablet PC</option>
<option value="handhelddevice">Handheld Device</option>
<option value="moniters">Moniter</option>
<option value="projectors">Projector</option>
<option value="printers">Printer</option>
<option value="fax">Fax</option>
<option value="copier">Copier</option>
<option value="scanner">Scanner</option>
</select>
</form>
</td></tr>

<tr><td width="25%"></td><td colspan=2>
Enter Expiry No.: <input type="text" size="2" value="DD"> / <input type="text" size="2" value="MM"> / <input type="text" size="4" value="YYYY"> to <input type="text" size="2" value="DD"> / <input type="text" size="2" value="MM"> / <input type="text" size="4" value="YYYY">
</td></tr>

<tr><td align="center" colspan=3><br>
<input type="submit" value="Search">
</td></tr>
</table>
</font>
</body>
</html>

keyword.html
-----------------
<html>
<head>
<title>Search by Keyword</title>
</head>
<body>
<center>
<font face="verdana">
<table width="100%">
<tr><th colspan=3 bgcolor="CCCCCC">
<h3>Search by Keyword</h3>
</th></tr>

<tr><td width="30%"></td><td><br>
Enter Keyword: <input type="text" size="30">
</td></tr>

<tr><td width="30%"></td><td>
<form name="prod" action="" method="POST">
Results should contain: <select name="prodtype">
<option value="all">All Keywords</option>
<option value="any">Any Keyword</option>
</select>
</form>
</td></tr>

<tr><td align="center" colspan=2><br>
<input type="submit" value="Search">
</td></tr>
</font>
</body>
</html>

chrishirst
05-07-2004, 08:25/08:25AM
Welcome to the forums sweetmess :hi:

Wrong forum for this topic but someone will move it to a more suitable home shortly.

Not entirely sure what you are trying to do but your approach is a bit off.

for something like this (dynamic ecommerce I am surmising) your database is far too simplistic and would become unsupportable beyond a few dozen items and in all honesty the backend code and methods needs to be sorted out before the interface, as that is where the majority of the work will be.

Any db designed to be fully searchable should be comprised of seperate tables with linking (key) fields between them (relational database). This greatly enhances search speed if the db design is done correctly and greatly reduces the amount redundant information stored.

in your case I would have [domain] in one table with a integer primary key, the same for [product type]. Then for the key fields to the product table use the ID number(s). This is a one to many relationship (producttype -> product) (show this category) and/or a many to one (product -> producttype) for reverse search capabilities (find all products like this). A bit of a basic example though.

You should either look for a shopping cart that will suit ( there aren't many around for ASP that are good and relatively cheap (believe me I looked, and decided to write my own)) or get your programmer to build some bespoke code for you.

Webmaster T
05-07-2004, 16:20/04:20PM
Three questions.

Are you a FrontPage user?
Does Your provider have indexing service turned on?
Do you use included files in your site?

If you answer yes to 1 and 2 and no to 3 then go to google and search there are a number of good tutorials on using FP and indexing service. There is a component built right into FP. If your service provider doesn't have the indexing service turned on then they might turn it on if you ask them nicely. That is assuming it is an IIS/windows host. IMO, if you don't know asp programming then a search feature you're likely going to need a 3rd party to implement it for you.

Michael D. Hudson
05-07-2004, 18:59/06:59PM
The database term which chrishirst was describing is called "normalization". You may even hear it labeled "3rd Normal". You very well may want to look these up to make your work easier over time regarding the maintenance of the site. IMHO.:)