The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 5 of 5

Thread: Tutorial Search: mySQL Filtering

  1. #1

    Tutorial Search: mySQL Filtering

    Hi Kirupans,

    Happy New Year to everyone. I'm trying to look for a tutorial that will allow me to filter my entire product catalog in a mySQL database. All of the products are already there and my database has been structured, but I'm looking for a way to have a page that spits out ALL of the products at once, then build in a form that lets my users select the features they're looking for, and narrow down their selection (live using AJAX if possible, but not necessary).

    If you know of a tutorial or a set of tutorials that would come in handy, or would like to lend me some guidance, let me know! Much obliged!

  2. #2

  3. #3
    Hey Brian,

    Thanks for the link. I think I've got a good grip on how to write the SQL queries (again, I think), but what I'm really looking for is information on how to write the PHP/Javascript to modify the SQL query as the user makes their selections.

  4. #4
    Anyone?

  5. #5
    I'm just going to post some conceptual stuff, no code. An easy way to do what you want is to have a template query, something like "SELECT * FROM $table SORT BY $sortMethod $direction"

    And then you have drop downs or whatever that would set the $table variable, the $sortMethod (i.e. date, id, etc) and then something to selecect ascending or descending.

    Not sure if this is what you're looking for or not, but you can load up your query with variables, so all you need to figure out is how to get the variables you want to where you want them.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012