# In over my head. Need to create a Searchable, Sortable database



## Omega_Shadow (Aug 2, 2004)

I have a large project and dont know how to begin. I guess telling you guys what I have to do and getting some input is a step in the right direction.

I am working on a website for my boss, www.paintballpawn.com

What I have to do is put all the paintball guns in some sort of a database, then access that database to display the guns by price, rating, type and model depending on user input. He also wants it to be searchable.

Looking at the current framework (or lack there of) I know I got my work cut out for me. Currently everything is done staticaly. For this to work the way he wants it the content must be driven by the database. I just need to know where to start.

Thanx guys.


----------



## brendandonhu (Jul 8, 2002)

You will really be better off using a script like osCommerce or ZenCart. These will handle all your items, searching, etc.


----------



## Omega_Shadow (Aug 2, 2004)

problem is he doesnt want to use those. I already suggested them and I was already shot down. He wants the site to look exactly like it is now with the exception that the guns sort themselfs


----------



## covert215 (Apr 22, 2006)

the site looks pretty good now, if you ask me


----------



## Omega_Shadow (Aug 2, 2004)

its not about how it looks now, my boss wants something done and I have to do it. My opinion on the matter is mute.

I will repeat my question

I have to know how to put all the paintball guns in some sort of a database, then access that database to display the guns by price, rating, type and model depending on user input. IT CAN NOT BE STATIC LIKE IT IS NOW. It must also be searchable.

Does anyone have any ideas or resources I can use to create this database and implement it in the way mentioned?


----------



## covert215 (Apr 22, 2006)

http://www.hotscripts.com/Tools_and_Utilities/Database_Tools/index.html

Look through there. I used to have a sweet program that did everything that you want but I can't find it anymore. You may need to customize some of the scripts, so a knowledge of php would be helpful.


----------



## brendandonhu (Jul 8, 2002)

Ok, what database and programming language you're using would help.


----------



## Omega_Shadow (Aug 2, 2004)

brendandonhu said:


> Ok, what database and programming language you're using would help.


I dont have one yet. I thought that was obvious from my post. sorry.  I am starting from SCRATCH. There is no pre-existing framework. I dont have a database, I have to build one. As for language I would prefer php but once again there is no framework so we can start anywhere and use what you think is easyer.

Thanx covert. I will check out that site after I am done posting a field layout on another page of his.


----------



## brendandonhu (Jul 8, 2002)

Ok, PHP and MySQL could definitely do this. You would just create a table with fields for an id number, model, manufacturer, price, etc. Your script could easily sort them price, rating, etc.


----------



## Omega_Shadow (Aug 2, 2004)

Question is, how do I do what you just said? I am a computer tech, not a web designer (although my boss thinks I am). About the only thing going for me is that I am a quick learner and am not affraid to mess with code. If you got some sort of crash course on how to get started I think I could take it from there, but you got to be specific about instructions. For instance how do I create that table your talking about and where would I put the code for it?


----------



## brendandonhu (Jul 8, 2002)

Well first you'll need to make sure your host offers MySQL. If you're just beginning you should get PHPMyAdmin installed, this will make it very easy to design the database and tables. You can create a table with a field for all the info you need to store (manufacturer, price, etc.), and put a row into that table for each item you want to display.

You'll want to read through the functions at http://php.net/mysql to learn how to query the database, display the results, etc. You can find plenty of tutorials on basic SQL on Google, you mostly just need to know how to use SELECT to order the entries the way you want, etc.

And finally you'll want to post your code here every once in a while to make sure it is secure or see what can be changed.

It looks like they don't actually sell their guns online so it should be fairly straight forward to get the site converted to PHP/MySQL once you learn how to use the database. You might also want to create a control panel to add new items, manufacturers, etc., to the database.


----------



## Omega_Shadow (Aug 2, 2004)

We do sell them online, only though www.owwpaintball.com, another one of our websites. Later on he wants a button that sends them to oww. Not sure how the hell that is going to work. I keep telling him we should just use oww (it uses zen cart) instead of two different sites but he could care less what I think


----------



## brendandonhu (Jul 8, 2002)

You can just have a field in your database for the product_id from oww and it will be fairly easy to make links for the items.


----------



## Omega_Shadow (Aug 2, 2004)

alright, well that's good. 

Now, I think I got mysql installed already on the server because OWW and the rest of the websites are located on the same server. How do I set up a database for this site without messing up the other sites databases?

This sounds like a duh question but I just want to be carefull. Last thing I need on my plate is rebuilding all those databases


----------



## brendandonhu (Jul 8, 2002)

Well make a backup before you do anything else. If you install PHPMyAdmin, it will give you a control panel to create a new database for your site.


----------



## Omega_Shadow (Aug 2, 2004)

alright, I backedup the database at oww. From what I can tell that is the only site that uses a database. Everything else is static.

Sorry bout all the stupid questions brendan, just never done this before.
Now I got phpmyadmin downloaded. How do I install it? Do I unzip it into a directory on the site? How do I run it and will running it remove what I already have up in that site?


----------



## brendandonhu (Jul 8, 2002)

Omega_Shadow said:


> Now I got phpmyadmin downloaded. How do I install it? Do I unzip it into a directory on the site?


Yes, there's a readme or install instructions in there somewhere. You'll need to put in your database username/password.



> Will running it remove what I already have up in that site?


No


----------



## Omega_Shadow (Aug 2, 2004)

Ok, its installed, now what? The options are going over my head.

I got to close up shop. I will post some more specific questions later when I get home.


----------



## brendandonhu (Jul 8, 2002)

There is an option in there to create a new table. You can name your table, and decide how many columns you need it to have. Then you will get a form where you can name each column and decide what kind of data it will contain (numbers, text, etc.)


----------

