Warning & lt; B & gt;: mysql_free_result (): suppliedargumentisnotavalidMySQLresult what is the error?
The connection is successful, but this error is reported ..
Database connected!
Warning: Mysql_free_result (): supplied argument is not a valid MySQL result resource inF: \ environment \ WAMP \ wamp5 \ wamp \ www \ test \ SQL. phpOn line17
Warning: Mysql_close (): supplied argument is not a valid MySQL-Link resource inF: \ environment \ WAMP \ wamp5 \ wamp \ www \ test \ SQL. phpOn line18
Reply to discussion (solution)
$ Result = mysql_query ($ SQL );
Change
$ Result = @ mysql_query ($ SQL) or die (mysql_error ());
$ Result = mysql_query ($ SQL );
Change
$ Result = @ mysql_query ($ SQL) or die (mysql_error ());
No database selected is displayed on the webpage. is this database not found?
However, I am using the Navicat 8 for mysql View tool.
I have created a database and a resume. How can I query the tables in this database?
You only connect to the database system, but do not select the database to be operated
Mysql_select_db ('database name ');
Otherwise, how do you know that you are querying the user table in that database?
In addition, your mysql_close ($ conn) is in the function, and $ conn is not passed to the function.
So there will be 2nd errors
Perfect answers from moderators
$ Result = mysql_query ($ SQL );
Change
$ Result = @ mysql_query ($ SQL) or die (mysql_error ());
No database selected is displayed on the webpage. is this database not found?
However, I am using the Navicat 8 for mysql View tool.
I have created a database and a resume. How can I query the tables in this database?
You do not have mysql_select_db before mysql_query. mysql does not know which database you need to perform the query operation.
After creating a connection, add one sentence
@ Mysql_select_db ('Enter the database name here ', $ conn) or die (mysql_error ());