Loading ...
Sorry, an error occurred while loading the content.
 

MYSQL fetching problem

Expand Messages
  • Ajit Tiwari
    Hi friends   I am facing problem in fetching data from mysql table by matching some conditions   a table name company_list having 5 fields one field is
    Message 1 of 4 , Jul 13, 2009
      Hi friends
       
      I am facing problem in fetching data from mysql table by matching some conditions
       
      a table name company_list having 5 fields one field is sub_cat and its contained value like 10, 20, 15, 12, 8, 2  and more but all value is coma seperated now i want to fetch all record which containing a particular value , for example i want to access all record that containig 12 in sub_cat feild
       
      Please let me know the query , its keep in mind that the table contains larg data so query should not be slow
       
       
      thanks in advance
       
      Regards
      Ajit




      [Non-text portions of this message have been removed]
    • juju pk
      hiretrieve the field normally using mysql_fetch_array[ subcat ].put the result in a variable for eg: $sub_cat.It will contain all the values alon with
      Message 2 of 4 , Jul 14, 2009
        hiretrieve the field normally using mysql_fetch_array['subcat'].put the result in a variable for eg: $sub_cat.It will contain all the values alon with commas.now seperate the commas using explode function.
        $elements=explode(",",$sub_cat);elements[0] will contain first value.elements[1] will contain second value and so on..thanks
        nithin



        See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/

        [Non-text portions of this message have been removed]
      • Abdul Rehman
        Hi, Just use regexp in the query if you can t get solution then call me. Warm Regards, Er. Abdul Rehman, (Software Developer) ________________________________
        Message 3 of 4 , Jul 31, 2009
          Hi, Just use regexp in the query if you can't get solution then call me.

          Warm Regards,
          Er. Abdul Rehman,
          (Software Developer)




          ________________________________
          From: Ajit Tiwari <ajit.tiwari@...>
          To: php4india@yahoogroups.com; bang-phpug@yahoogroups.com
          Sent: Tuesday, July 14, 2009 10:58:01 AM
          Subject: [bang-phpug] MYSQL fetching problem





          Hi friends

          I am facing problem in fetching data from mysql table by matching some conditions

          a table name company_list having 5 fields one field is sub_cat and its contained value like 10, 20, 15, 12, 8, 2 and more but all value is coma seperated now i want to fetch all record which containing a particular value , for example i want to access all record that containig 12 in sub_cat feild

          Please let me know the query , its keep in mind that the table contains larg data so query should not be slow


          thanks in advance

          Regards
          Ajit

          [Non-text portions of this message have been removed]







          [Non-text portions of this message have been removed]
        • Abdul Rehman
          It wouldn t work friend. Warm Regards, Er. Abdul Rehman, (Software Developer) ________________________________ From: juju pk To:
          Message 4 of 4 , Jul 31, 2009
            It wouldn't work friend.

            Warm Regards,
            Er. Abdul Rehman,
            (Software Developer)




            ________________________________
            From: juju pk <techithin@...>
            To: bang-phpug@yahoogroups.com
            Sent: Wednesday, July 15, 2009 10:50:41 AM
            Subject: [bang-phpug] MYSQL fetching problem





            hiretrieve the field normally using mysql_fetch_ array['subcat' ].put the result in a variable for eg: $sub_cat.It will contain all the values alon with commas.now seperate the commas using explode function.
            $elements=explode( ",",$sub_ cat);elements[ 0] will contain first value.elements[ 1] will contain second value and so on..thanks
            nithin

            See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz yahoo.com/

            [Non-text portions of this message have been removed]







            [Non-text portions of this message have been removed]
          Your message has been successfully submitted and would be delivered to recipients shortly.