How to make a db to search for collectibles?

Status
Not open for further replies.

SleepyStarling

The Narcoleptic Queen
Mar 21, 2007
102
1
0
I'm trying to make a user-searchable db. I've tried to study the database for the city/state/zipcode thing and I'm confused as hell. My server has PHP and MySQL, but I can't even fucking get Apache installed on WinXP to get PHP and MySQL installed to learn them from tutorials. Many of my ideas revolve around using MySQL. Around and around we go.

I know, I know, I'm a moron. It's fairly easy to remember code instructions, but I can't practice on my computer, and that's pretty damn useful when all of the tutorials want you have the trio installed before you start. Any help would be really helpful before I develop a concussion from banging my head against the desk.


So a visitor to my site is looking for a certain type of widget or whatever. There are several variables that s/he can include or exclude in a query, such as year of manufacture, color, features, price range, etc. When the user uses a combination of checkboxes / keywords, s/he will come up with a page listing pictures and links to descriptions of all widgets that match those parameters.

Is this even feasible in MySQL? If so, I'd really like to know how to do it. Thanks in advance.
 


First of all, download and install WAMP to practice PHP/MySQL on your Windows machine. It's a very easy process and once it's installed, you can control everything with just a few clicks.

As for your problem - it's certainly possible. Look into using forms (one of the most basic things in PHP) to control the output of data. Here's some pseudo code of what your PHP would look like:

Code:
[form here with each field you talked about]
send data....
make variables safe using mysql_real_escape_string()
mysql query: SELECT id, name, picture FROM widgets WHERE color='red' AND features='foo'

It's hard to point you any further than this because I'm not completely sure on your understanding of it all at this point. I recommend looking at different tutorial sites. A good directory is Photoshop Tutorials, Flash Tutorials and More! P2L Tutorial Search, and of course Google and php.net are your friends. :D
 
Status
Not open for further replies.