You can also try "or die ()" after your query. I think this would terminate your scripts execution as well, which may or may not be a good thing.
There is also the fact that just about everything in php can be bool as well as what its really intendend to do. Now I never tried it, but an "if" should work for you.
if ($dbq = mysql_query("select * from table")) {
echo "it worked";
}
else {
echo "it failed";
}
Taken another way:
if ($dbq = mysql_query("select * from table")) {
require('./dbsuccess.php');
}
else {
require('./dbfail.php');
}
You can then use the $dbq results just as if it was done without the "if"
Best of luck,
JackANSI