Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: call to mysql

  1. #1
    Banned
    Join Date
    Dec 2006
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    call to mysql

    Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/brown/public_html/themafia/countrys.php on line 328

    ^^ not sure what this means :S

  • #2
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    it means that the query you've used is wrong.
    change your code so it does something like:
    PHP Code:
    $query 'SELECT * FROM table'//except your query has an error...
    $result mysql_query($query) or die(mysql_error().$query);
    while(
    $obj mysql_fetch_object($result)) {
     
    //blah

    and you'll get an error message that's more useful.

    Alternatively, paste a copy of the code (just the bit with the query...as in my code above) and someone might spot the problem.
    My thoughts on some things: http://codemeetsmusic.com
    And my scrapbook of cool things: http://gjones.tumblr.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
    •