Re: Mysterious MYSQL Error..
| From: | Steve Edberg | Date: | Sun, 22 Jul 2001 21:27:26 +0000 |
| Subject: | Re: Mysterious MYSQL Error.. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-59091@lists.php.net to get a copy of this message | ||
Do you know if you've even made a valid database connection? Try echoing $this->database as well. If that is null, you haven't connected to your database; perhaps the username, password and or permissions were changed, so that you're unable to connect from your PHP program.
- steve
At 9:47 AM -0400 7/22/01, Greg Schnippel wrote:
I'm stumped on this one.. I set up PHP 4.04/Apache/Mysql 3.23 on my Windows 98 box for development purpouses. Its been working flawlessly for 2-3 years now (using the same configuration files, etc). However, as of 3 days ago, i can't get it to execute a simple "select * from table query". Here's the code I'm using: $query = "select * from $this->table where $this->primary_key='$record_id'"; $result = mysql_query($this->database, $query); echo mysql_errno().": ".mysql_error()."<BR>"; and the query that it sends to the mysql database is "select * from article where article_id='1'"; However, mysql fails to execute the query. Result returns nothing and the echo command returns: errno: 0 mysql_error_text: "" ??!? I've tried everything to get it to display any more information as to why its breaking but nothing works. I even uninstalled and reinstalled all of the packages, thinking it had something to do with a windows dll file or something annoying like that but no luck. Any ideas? Anyone encountered a problem like this? Thanks, Greg-- +------ Factoid: Of the 100 largest economies in the world, 51 are ------+ | Steve Edberg University of California, Davis | | sbedberg@ucdavis.edu Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +--- corporations ------ http://www.ips-dc.org/reports/top200text.htm ---+