Re: Error: Supplied argument is not a valid MySQL result resource
| From: | (Miles Thompson) | Date: | Thu, 24 May 2001 14:31:37 +0000 |
| Subject: | Re: Error: Supplied argument is not a valid MySQL result resource | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-54230@lists.php.net to get a copy of this message | ||
db_connect doesn't exist.
Try mysql_connect, or better yet, mysql_pconnect()
Online manual at www.php.net.
You can get quick results for any function by entering http://www.php.net/name_of_function
and it is automatically searched for.
Miles
At 03:15 PM 5/24/01 +0100, Internaut wrote:
Hello I am in the process of learning php by following the examples out of the book, as I try to run this script an error message appears with the following: Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/vhtdocs/tosh/php/show_more_db.php on line 10 Here is the script: <?php //show_more_db.php include "./common_db.inc"; $link_id = db_connect('sample_db'); $result = mysql_query("SELECT * FROM user", $link_id); while($query_data = mysql_fetch_row($result)) { echo "'",$query_data[1],"' is also known as ",$query_data[3],"<P>"; } ?> Please can you advise further, kind regards Tony -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net