Results 1 to 9 of 9

Thread: Dynamic mysql search

  1. #1
    Join Date
    Apr 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dynamic mysql search

    Hey everyone!
    I'm looking for help with a dynamic search system for one of my sites I just started working on.

    I want something like this: http://www.southdakotawow.com/minis
    Notice all the search variables on the right? All those nifty drop down boxes and such.

    Well that's what I want.
    But I have no idea where to start. I know next to nothing about mysql.

    I've looked around W3schools, and I seen the search arrays. This is probably what I'm looking for but I don't really know.

    Thanks in advance!

  2. #2
    Join Date
    Apr 2009
    Location
    India
    Posts
    41
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    you want the code in php, asp or .net ........


    which one you want....

  3. #3
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    Another question, how do you intend to store the data, tables, text file, etc?

    The search on the site that you mention is building up a string that is used when extracting data from the database.
    Last edited by forum_amnesiac; 04-23-2009 at 10:42 AM. Reason: spelling

  4. #4
    Join Date
    Apr 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by amutha View Post
    you want the code in php, asp or .net ........


    which one you want....
    I code in php.

    About how I store the data; If I can do it in a text file that would be great since I'm not all that experienced working with mysql tables.

  5. #5
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    I personally feel that the choice of how to store the data is dependant on the volume of data, number of fields, etc.

    I personally prefer to use MYSQL because I find it quite flexible when it comes to querying, 'searching', for the relevant data.

    You need to define your data and what fields, or combinations, you want to be able to query by.

    When you have done this it will be easier to get the right advice here.

  6. #6
    Join Date
    Apr 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Then mysql it is!
    I'll be using it for a game, similar to the link I provided above.

    I'm thinking something smaller though...

    Drop downs:
    Archetype - Fighter, Mage, Priest, Scout.
    Type - Ability, Item, Tactic, Unit.
    Cost - 1, 2, 3, 4, 5, 6, 7, 8, 9.

    Check boxes:
    Sets - Oathbound, Forsworn, Inquisitor, Oathbreaker, Ethernauts, Against the Void.
    Rarity - Common, Uncommon, Rare, Ultra Rare, Promo, Fixed, Raid.


    There are some others that I might want to add in the future, but these are the primary ones.

  7. #7
    Join Date
    Apr 2009
    Location
    India
    Posts
    41
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    Archetype - Fighter, Mage, Priest, Scout.
    Type - Ability, Item, Tactic, Unit.
    Cost - 1, 2, 3, 4, 5, 6, 7, 8, 9.

    Check boxes:
    Sets - Oathbound, Forsworn, Inquisitor, Oathbreaker, Ethernauts, Against the Void.
    Rarity - Common, Uncommon, Rare, Ultra Rare, Promo, Fixed, Raid.
    you store category in same table or single table. like

    you store in same table means (Archetype, type, cost, sets, rarity,....)

    or each one is a single table like

    Archetype
    type
    cost
    sets
    rarity
    ....

  8. #8
    Join Date
    Mar 2009
    Location
    NJ, USA
    Posts
    32
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    You can start with the dropdown menu here.
    http://www.echoecho.com/htmlforms11.htm
    Have you worked with forms before?

    I'm assuming you have and you've put the data into .txt files. This is quick and effective but unorganized and can lead to security issues. Think of MySQL as an Excel chart.

    Archetype - Fighter
    Type - Item
    Cost - 6
    Sets - Ethernauts
    Rarity - Raid.

    These columns would associate with what? Are people joining as members on this site or are you displaying a 1337 l00t database to people who come on your site?

    If you have members you could add a field called user_id (login name)

    [User_ID] - captainmonday -AdrielGreene
    [Archetype] - Fighter - mage
    [Type] - Item - unit
    [Cost] - 6 - 2
    [Sets] - Ethernauts - Inquisitor
    [Rarity] - Raid. - rare

    These fields are associative. You can call the field Type WHERE User_ID is equal to "Captainmonday"; which would display "item"

    Do you have a web host? If you do they probably have PHPMyAdmin - a GUI that makes organizing MySQL a bit easier.

  9. #9
    Join Date
    Apr 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Anyone else?

Bookmarks

Posting Permissions

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