#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Sweden
    Posts
    32
    Rep Power
    14
    I've been trying to display multiple text in a page using the MySQL, this the one i'm using right now:

    select * from coder where user_id='$profile' group by user_id order by title

    Lets say I have 3 records in the coder table. two with same user_id since I want both titles from this user to be shown on same page.

    When I try the code above it only shows the first record of this user. Anyone know what i'm doing wrong?

    Thanks,
    Toby
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    Get rid of the group by clause. Since you aren't using any functions that requires the records to be grouped it isn't doing anything... except causing you to only get one record per user_id.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Sweden
    Posts
    32
    Rep Power
    14
    I removed the 'group by user_id' part but it still only show the first record.

    Is it something else I should put there too?


    Thanks,
    Toby

Similar Threads

  1. delete multiple records using checkboxes
    By MotherStoryGun in forum PHP Development
    Replies: 12
    Last Post: May 29th, 2004, 06:20 PM
  2. save multiple records using a single submit
    By ckb in forum PHP Development
    Replies: 7
    Last Post: February 13th, 2004, 11:20 PM
  3. SQL Delete multiple records
    By xsoftdev in forum MS SQL Development
    Replies: 4
    Last Post: October 16th, 2003, 10:44 PM
  4. Insert records in multiple tables
    By Qasim in forum Beginner Programming
    Replies: 1
    Last Post: September 30th, 2003, 12:13 AM
  5. Replies: 2
    Last Post: June 3rd, 2003, 08:16 AM

IMN logo majestic logo threadwatch logo seochat tools logo