Results 1 to 2 of 2

Thread: MySQL Error

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    MySQL Error

    I'm getting the error message "Warning: Supplied argument is not a valid MySQL result resource in /home/vbshelf/public_html/try.php on line 6" with the following code:

    PHP Code:
    <?php
        $db 
    mysql_connect("localhost""user""pass");
        
    mysql_select_db("database",$db);
        
    $result mysql_query("SELECT * FROM vb",$db); //problem line
        
        
    if ($myrow mysql_fetch_array($result)) {
            echo 
    "There are records!";
        } else {
            echo 
    "Sorry, no records were found!";    
        }
    ?>
    What's going wrong?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  2. #2

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    nevermind, I forgot to add the user to the database.
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

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



Click Here to Expand Forum to Full Width