$40 To Solve My Search Problem

Discussion in 'PHP' started by AquaMaureen, Oct 19, 2007.

  1. #1
    I have a php/mysql search of product inventory.

    All of the products are stored in the database as records. Each record (product) has several characteristics(columns). You are only able to search the records by 4 of the columns. This works fine.

    The problem I am having is with the sorting of the results. One of the columns follows no logical alpha/numeric sorting but there is a definite way it should be sorted.

    For searching this column, I have made another column with a number variable 1-9 representing highest to lowest and used the search label to represent the correct variable. The results that are displayed, though correct, are the actual variable and I can not get it to sort lowest to highest.

    I apologize, I am not a coder, and I know I am not describing this well.

    Your solution must not drastically change the system i am using. It may be bass ackwards, but it works for us and we can update it with ease.

    Please PM me for details. I really appreciate all responses.

    Payment is by paypal only.

    Thank you!

    P.S. Also posted in contests
     
    AquaMaureen, Oct 19, 2007 IP
  2. Edynas

    Edynas Peon

    Messages:
    796
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #2
    my first thought is maybe also not good coding :)

    create a new table called tmp results.
    Store your search results in it. make a loop to identify the number of your second table and insert the values. When this is done echo the result with sorting on the secondtable values and drop the values of the tmp resultstable.

    Make sure that you have a key in the tmp table that will identify records from a search result that belong together and use that in your query and drop.
     
    Edynas, Oct 20, 2007 IP
  3. AquaMaureen

    AquaMaureen Peon

    Messages:
    50
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi Edynas,

    Thanks for your response. Maybe the coding is not so good, but even in excel, just trying to sort the column doesn't work because there is no logic to the best-worst order. Thanks for your advice on the remedy, but this is beyond my capabilities and why i am offering $ for someone to either explain it clearly or do it for me. I am even flexible with the money offered.
     
    AquaMaureen, Oct 20, 2007 IP
  4. rspenc29

    rspenc29 Peon

    Messages:
    256
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It sounds simple but I am having trouble interpreting exactly what your trying to say.

    It sounds like you have something like this

    1=>'some illogical value'
    2=>'another value'

    etc all the way to nine.

    Then you are using the numbers 1-9 to fetch the right records? So when you get your results is it all one number? For example you return everything for number 1 and display its related value ? Please try to be a little more specific in your description.
     
    rspenc29, Oct 20, 2007 IP
  5. robca

    robca Well-Known Member

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    116
    #5
    could you provide an example what is in the tables, how the ourput must look like, maybe that will be easier to help you ;)
     
    robca, Oct 22, 2007 IP