[wplug] Semi OT: PHP mysql_connect() not returning resource link.

Chet Hosey chosey at nauticom.net
Wed Dec 14 14:38:24 EST 2005


Chris Romano wrote:

> Try putting "or die('Query failed: ' . mysql_error());" at the end of
> your query statement.  ...
> $res = mysql_query("SELECT * FROM temp_stories",$dbi) or die('Query
> failed: ' .mysql_error());
>
> That will print any errors from mysql.
>
> Chris

He did say,

> No errors are echoed to the screen even using "or die(mysql_error())";

...although it wasn't clear whether that meant after the mysql_query(),
after the mysql_connect(), or both...

And it'll print errors, but not warnings, which *might* be relevant.

Good thoughts, though.

Chet


More information about the wplug mailing list