1 Reply Latest reply on Jun 22, 2008 4:17 AM by |>AoA<|_killa

    Search engine in Flex

      I have a database where 1 product can have 3 different manufacturing numbers.
      The fields in the table parts look like this:

      pid---- manufacturingnr1----- manufacturinnr2------- manufacturingnr3------ numbers---------- price

      1------------TRW44104-------------------R875A--------------------------------------------- -1----------------250,00
      2------------FWA324123-------------------------------------------------------------------- -----2----------------275,00
      4------------BLE314567-----------------K347678-------------------------------------------- 1----------------150,00

      (there is no uniqe articlenumber)

      Now I have build a search engine i Flex with the texfield id=manufacturingnr where I
      pass the variable to a php-script that execute a the query:

      $Query = "SELECT * FROM parts WHERE manufacturingnr1 LIKE '". $trimmed ."%'";
      $Result = mysql_query( $Query );

      The problem is when a user enter a manufacturingnr in the the textfield and hit search
      the user dont find any parts with another maunacturingnumber then manufacturingnr1

      In this case users allways search on that special manufacturing number but
      it gives me a lot of problem of how to solve the search so the users find the part
      whatever manufacturing number the user enter in the texfield with the id=manufacturingnr1
      or whatever you called it. (here´s the problem for me - the id of the textfield)

      (I´m not allowed to change the design of the database)

      I really appreciate som help or some tip where I can learn more of how to solve the problem.