Forums

Dynamic multi column Search Box (3 posts)

  1. multiwheeler
    Member
    Posted 1 year ago #

    Guys This is my first post to the forum .I want to make multicolumn Dynamic compare box of two cars by Make,Model,Version for my website http://www.multiwheeler.com .When submit button is pressed ,values (makes,models,versions) are passed as parameter to a custom function in functions.php to display the comparison table of data from a custom table(wp_car_detail).I already made this function but don't know how to make this search box. :(
    The search box is dynamic like when a Make is selected ,the related models are fetched from sql and displayed for selection similarly for version.
    Can you suggest me how to achieve this .I am tired of searching google :(

  2. multiwheeler
    Member
    Posted 1 year ago #


  3. multiwheeler
    Member
    Posted 1 year ago #

    The problem here is that the database's primary key is of no use .
    It's because of this type of table structure ..
    id make model version -----

    1 make1 model1 v11 -----
    2 make1 model1 v21------
    3 make1 model2 v1.1-----
    4 make2 model2 v12 ---
    2 make2 model1 v2.0----
    3 make2 model2 v2.1-----
    4 make2 model3 v2.2----
    --------------------
    -------------------- and so on ...
    As i am interested in make ,models and versions ,One Make will have a lot of IDs corresponding to different models and versions.It's easy to show fields in list box of make area by Select distinct make from table ; but
    select distinct id,make from table ; is useless here because the out will be a lot of different id with same make .
    like the output would be and the list box will contain repeated items-->
    ID Make
    1 make1
    2 make1
    3 make1
    4 make2
    2 make2
    3 make2
    4 make2
    So Even with ID as primary key it's worthless to use .
    SO any idea about how to show models based on selection of make and similarliy versions in this case ?

    The problem is due to this type of table structure ...

    id make model version -----

    1 make1 model1 v11
    2 make1 model1 v21
    3 make1 model2 v1.1
    4 make2 model2 v12
    2 make2 model1 v2.0
    3 make2 model2 v2.1
    4 make2 model3 v2.2
    --------------------
    -------------------- and so on ...

    I want to and pass the submitted value to the function as parameter ..
    I know it's not a big issue for you guys . :O

Topic Closed

This topic has been closed to new replies.

About this Topic