Re: Question on DB
| From: | Miles Thompson | Date: | Tue, 09 Oct 2001 16:36:47 +0000 |
| Subject: | Re: Question on DB | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-13147@lists.php.net to get a copy of this message | ||
The error isn't on those lines, it's higher up in the code. Those lines are trying to use the values $return and $meta_return which would be filled by queries. Search for occurences of those earlier in your code.
These messages generally indicate that a SQL query failed. To debug further, echo the statements you find used in either mysql_query or mysql_db_query functions.
Before those you should see mysql_connect or mysql_pconnect functions to connect to the database. I would assume those are working OK as an error is not being thrown when the script executes the queries.
If you aren't familiar with PHP go to Juli Meloni's http://www.thickbook.com site and work through a couple of examples to quickly cover the basics.
For exhaustive information on PHP it's http://www.php.net you turn to.
And no, you don't need a .sql file. Those are usually text files read by MySQL to create a database, loadit with data, what have you. The extension isn't significant.
Hope this helps - Miles Thompson
At 12:06 PM 10/9/01 -0400, Viper1 wrote:
I have a question about a problem I am having on a mysql db. I have inherited a website from someone that I can no longer get in touch with. The website is a smaller version of Monster.com it allows user to submit a resume and search jobs online. I am having errors on it but I am not sure I have it all. Should it have a *.sql file? It has only phtml,inc files also a admin area and all the images. I am getting an error on index.phtml of: Warning: Supplied argument is not a valid MySQL result resource in C:sitessitesindex.phtml on line 7 and : Warning: Supplied argument is not a valid MySQL result resource in C:sitesdocsma.inc on line 7 line 7 of index is: $copy = mysql_fetch_array($return); line 7 of ma.inc: $meta_row = mysql_fetch_array($meta_return); Please help . Thanks.. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net