Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default Mysql display multiple rows.

    Ive got this far:

    PHP Code:
    $query mysql_query("SELECT * FROM pm WHERE sendto = '$usernameid' LIMIT 0 , 30");

    $query mysql_query("$query");

    while(
    $row mysql_fetch_array($query)) {
    echo 
    "<a href=\"pm.php?viewpm=" $row['id'] . "\">" $row['subject'] . "</a>";

    Its ment to list the first 30 PMs that the user has got. But i get this error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp2\www\entertain-me\pm.php on line 34

    I cant figure out why its not working :S

    EDIT: fixed I just realised i have queried the sql twice
    Last edited by Decode; 20-06-2008 at 05:38 PM.
    Lets set the stage on fire, and hollywood will be jealous.

  2. #2
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Hi,

    Good to hear you've managed to fix the issue!

    Thanks,
    Invent

Posting Permissions

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