php sql view certain records

Discussion in 'PHP' started by xbat, Nov 22, 2011.

  1. #1
    I have a database with about 4000 items.. How would I view only certain items in certain rows?

    Say for example... - I just want to view the 3's in B and C and E

    A - B - C - D - E
    1 - 3 -3 - 3 - 3
    2- 3 - 3 - 3 - 3


    Any help would greatly be appreciated.
     
    xbat, Nov 22, 2011 IP
  2. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #2
    mfscripts, Nov 23, 2011 IP
  3. xbat

    xbat Well-Known Member

    Messages:
    326
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    105
    #3
    Sorry my english isnt the best.. I want the user to be able to select what should on the table... maybe from a drop down box or something..
     
    xbat, Nov 23, 2011 IP
  4. xbat

    xbat Well-Known Member

    Messages:
    326
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    105
    #4
    ok Say if I wanted to view just All the blue items in table ? Would it be better to put in a drop down box any one have any ideas?
     
    xbat, Nov 27, 2011 IP
  5. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #5
    However you determine which rows to get has nothing with how you select them. The PHP file is going to get one or more variables from the html page. Those will be the ones in your SELECT statement (WHERE COLOR = 'blue' or WHERE B = 3).

    Hoiw you generate the variables - let the user pick them from a dropdown, have them hardcoded, etc., is up to you, but it doesn't affect what happens on the server.
     
    Rukbat, Dec 1, 2011 IP