Displaying results of column

Discussion in 'MySQL' started by socalbeach, Mar 11, 2007.

  1. #1
    How do display the items name and a count of that items from a (column) in a table in mysql using php. And also split the results into columns.

    Sample:
    Algorithms (3) COM for Windows (2)
    Apache (1) CURL (1)
    Arrays (5) Classes Objects (2)
    :cool:
     
    socalbeach, Mar 11, 2007 IP
  2. spachev

    spachev Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The meat of the problem:

    select cat_name,count(*) from items group by cat_name

    details - do a Google search for a tutorial on how to get data out of MySQL in PHP, there should be plenty on the net.
     
    spachev, Mar 12, 2007 IP