SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru adammc's Avatar
    Join Date
    Aug 2004
    Location
    Cairns, Australia
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Debugging error :(

    Hi guys,

    Anyone know why I am getting a "Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result " error on this?

    PHP Code:
    // Get the student info from DB    
        
    $query mysql_query("SELECT student_id, type, guardianship , first_name, last_name, agent_number FROM students WHERE username='$user'") or die(mysql_error()); 
        
    $result mysql_query($query);
        while(
    $r mysql_fetch_assoc($result))
        { 

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    // Get the student info from DB    
        
    $result mysql_query("SELECT student_id, type, guardianship , first_name, last_name, agent_number FROM students WHERE username='$user'") or die(mysql_error()); 
        while(
    $r mysql_fetch_assoc($result))
        { 
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



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
  •