Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result

后端 未结 6 828
耶瑟儿~
耶瑟儿~ 2020-11-21 05:35

I get the error when trying to run this:

query(         


        
6条回答
  •  无人共我
    2020-11-21 06:01

    I find this in a post, to me solved my problem. Slds.

    Yeah, Answer is simple, the query used is not a true result as it's a query inside of a getrow so to speak.. Here is the fix: Find all lines that look like this:

    mysql_fetch_array(mysql_query("...snip...";-) );
    

    And just add a "@" in front of it so it looks like this:

    @mysql_fetch_array(mysql_query("...snip...";-) );
    

    Then do the same thing for the following lines.. Code:

    mysql_num_rows(mysql_query("...snip...";-) );
    

    Perform the same steps as above by adding the "@" to it so it looks like this:

    @mysql_num_rows(mysql_query("...snip...";-) );
    

    All this does it say "While doing xxx within yyy" Otherwise, it's dead due to missing result value. It's a PHP thing..

    Works like a charm, took me 5 mins to rip the whole code apart and slap it all into Modernbill, Shares the same database and works perfectly for me.

提交回复
热议问题