Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie in MANY ways 2

Status
Not open for further replies.

ssnapier

Technical User
Feb 17, 2001
67
US
Ok, I am a little bit over my head here, and trying to catch up in a hurry. I have a parts inventory for a VW shop in Access 2000, I want to use this on my website as a catalog to people to search from. I want them to be able to sort by model, chassis, or major system (engine, exhaust, etc.)

I am sure this a multi step process, and I just need to get pointed in the right direction, so every little bit helps! I am also posting on the Access forum to see what I need to do to my database to make it web ready.... please be patient with me as I am sure I will be asking LOTS of questions in the near future!
 
I want to be able to use my existing database on my website. I want it to be searchable, and I want to be able to have folks also view the entire list if they choose. When they search it I want them to be able to sort by one of four categories; engine, chassis, model, major assembly (engine, exhaust, suspension, etc.) I may not even be posting in the right forum, but I had to start somepalce!
 
sounds like the biggest portion of your task is to determine exactly what groups of parts you want them to search on and then create a database and tag the parts that make up each group with an identifier in a single column i.e. all the engine parts have and i.d. of 1, all chasis parts have an i.d. of 2 etc. If you have an existing spreadsheet of all the parts, it's just adding a column and the identifier for each part. Then in your .asp page, create a case statement that will "finish" your SQL statement so...your first portion of the SQL statement selects the columns that you want the user to be allowed to search on and declares where the table lives then each case statement reads the users selection, does a comparison and chooses the correct case. So, if they know the part #, they can search by part # and the part # case is used and you can use the %like% in case they miss type or something. If the user wants a group of parts, the case used would be the i.d. number you've assigned for that group i.e. 1=engine, 2=chasis etc. then just display the results in table...possibly as links to each part so that if they're looking for an engine part and find the one they're looking for, they can just click straight there as opposed to having to jot down the part number and do another search.

hth
mark
:)
 
Ok... I understand most of that, but I am at the rock bottom of the learning curve here, so is there a more dummy friendly version of that explanation?
 
sure (capitalized stuff is the sql command)

at the top of the 2nd page you request in the variables that you're passing then

you have to connect to the database to retrieve the data.
when you connect you tell the computer what columns to select and where the table lives i.e.

sql= SELECT "id, part_number, part_descrip, price FROM parts_table"

so now your user can search on the 4 columns listed. In your script you build a CASE statement something like:

SELECT CASE (search)
CASE "id"
If searchvar = "id" then
sql= sql & "WHERE & '"input"' LIKE '%"searchvar"%'
end if
etc.

then do a response.write into a table of the results

this is kind of abbreviated but hopefully gives you the idea

I think the way you make it a link is the urlencode command but I'm not real familiar with that (sorry) tho I did see someone make reference on how to use it on a recent post in this forum.

hth
mark

 
Thanks a bunch... I will get this stuff figgered out if it kills me... everytime you think you know your stuff... BLAMO!!! somebody wants sumthin you can't do... isn't it great?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top