WordPress.org

Ready to get started?Download WordPress

Forums

Wrong mysql_fetch_array (3 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #


    function author_info() {
    $u_id = $_GET['id'];
    global $tableusers;
    $result = mysql_query("select user_nickname from $tableusers were id='".$u_id."'");
    while($r=mysql_fetch_array($result))
    {
    $nickname=$r["user_nickname"];
    echo "$nickname";
    }
    }

    I get the following error:
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\serv\www\wp-content\plugins\profile.php on line 15
    i'm using wp-profile.php?id=1
    Does anybody see what i'm doing wrong? I sure don't ... i give up

  2. Anonymous
    Unregistered
    Posted 10 years ago #

    When i'm online, you can see it not working @ http://schot.xs4all.nl

  3. Anonymous
    Unregistered
    Posted 10 years ago #

    Got it:
    function author_info() {
    global $tableusers;
    $u_id = $_GET['id'];
    $result = mysql_query("select user_nickname from $tableusers where id='".$u_id."'");
    $r=mysql_fetch_array($result);
    echo $r["user_nickname"];
    }
    Lock?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.