Warning: mysql_fetch_array () expectsparameter1. how can this problem be solved?

Source: Internet
Author: User
Warning: mysql_fetch_array () expectsparameter1Warning: mysql_fetch_array () expectsparameter1toberesource, booleangiven Warning: mysql_fetch_array () expects parameter 1
Warning: mysql_fetch_array () expects parameter 1 to be resource, boolean given in/home/kxmusic/test. php on line 8


I use XAMPP for linux
WAMP can be used on the local machine
However, this error occurs the last time I arrived at the server.
Please advise


PHP code
  
  "; 17 echo" logout "; 18} else {19 echo" incorrect password or user name "; 20 session_destroy (); 21} 22 23} 24 25 26 27?> 28
  29 30: Happy sausage powder network: happy music room 


Config. php
PHP code
  
  '200') {32 echo "logon timeout"; 33 exit (); 34 session_destroy (); 35} else {36 $ _ SESSION [times] = mktime (); 37} 38} 39?>


------ Solution --------------------
Var_dump ($ query); // what is displayed here
$ Row = mysql_fetch_array ($ query );
------ Solution --------------------
The query result is incorrect. It should be an object,
$ Query = mysql_query ($ SQL) or die (mysql_error ());

Enable the error mode, so that you will not have this problem, because your error prompt level is too high!

Discussion
Var_dump ($ query );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.