Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder Ludatha's Avatar
    Join Date
    Jan 2008
    Posts
    250
    Thanks
    51
    Thanked 5 Times in 5 Posts

    Selecting only certain data

    Hi, how do I make it so only data with the type column as pictures will be displayed.

    In the column 'type' there can either be; Picture, Video, Music or Flash
    I only want the rows that contain 'Picture' in the type column to be displayed.

    PHP Code:
    $sql "SELECT * FROM portal ORDER BY type LIMIT 20"
    Thanks

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by Ludatha View Post
    Hi, how do I make it so only data with the type column as pictures will be displayed.

    In the column 'type' there can either be; Picture, Video, Music or Flash
    I only want the rows that contain 'Picture' in the type column to be displayed.

    PHP Code:
    $sql "SELECT * FROM portal ORDER BY type LIMIT 20"
    Thanks
    PHP Code:
    $sql "SELECT * FROM portal where type = 'Picture' ORDER BY type LIMIT 20"
    best regards

  • Users who have thanked oesxyl for this post:

    Ludatha (02-18-2008)

  • #3
    Regular Coder Ludatha's Avatar
    Join Date
    Jan 2008
    Posts
    250
    Thanks
    51
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by oesxyl View Post
    PHP Code:
    $sql "SELECT * FROM portal where type = 'Picture' ORDER BY type LIMIT 20"
    best regards
    Thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •