Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23

Thread: Display data from database in a table with different colours

  1. #21
    Join Date
    Oct 2006
    Posts
    94
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    My mistake, the scripting is correct, and it does output further rows, I forgot to change a variable!!

    However, the output is wrong. For some reason, it only outputs for each row under "Player" the word "rray". I have no idea where this word has come from. It certainly isn't in the field in the database. It outputted it 3 times which is correct as there are 3 names stored.

    Any ideas?

  2. #22
    Join Date
    Oct 2006
    Posts
    94
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I just tried something. Declaring the variable in the span statement, and this outputted a name in the correct way in the table. But it only outputs the last name in the database. Why is this?

    Code:
    while($row = mysql_fetch_array($result, MYSQL_ASSOC))
    $name= $row['alias'];

  3. #23
    Join Date
    Oct 2006
    Posts
    94
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Ive done it!!! I was using the wrong MYSQL statement.

    Here's the corrected code!!!

    Code:
    while(list($alias)=mysql_fetch_row($result))

Bookmarks

Posting Permissions

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