MySQL Just Choked

software development

#1

I was fine tuning some PHP code that interacts with MySQL and all of the sudden it can’t make queries. I wasn’t messing with any methods that have to do with queries or connections but sitewide I can’t make a query. PHPMyAdmin works…

Here’s what I get after a query:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in PATH TO FILE

The method’s involved are very simple and have worked fine for a few weeks now. Any suggestions?


#2

[quote]The method’s involved are very simple and have worked fine for
a few weeks now. Any suggestions?

[/quote]

Maybe upload a super-simple test script and reduce the number of variables to the absolute minimum?

For example, a PHP script (untested, but should work I think):

<?php print "A"; $db = mysql_connect("mysql.yourdomain.com","mysqluser","mysqlpass"); mysql_select_db("mysqldbname"); $result = mysql_query("SELECT NOW()", $db); print mysql_result($result, 0); print mysql_error($db); print "B"; ?>
  • Jeff @ DreamHost
  • DH Discussion Forum Admin