- Add a bit more error reporting, and do the error report before attempting to

use the result.
This commit is contained in:
dave 2007-12-18 19:50:12 +00:00
parent 2363a38120
commit 1b83ff4c12

View File

@ -1017,6 +1017,11 @@ class TableEditor
// print("query[$query]");
$q=mysql_query($query);
if($q == false) {
echo "Sorry, MYSQL query failed: <pre>$query</pre><br />";
echo "Error: ".mysql_error();
exit;
}
//put in some paganation stuff here.
$foundrowsq=mysql_query("SELECT FOUND_ROWS() AS f");
@ -1116,7 +1121,6 @@ class TableEditor
echo " (Total: $foundrows)\n";
if(mysql_error()){ echo error(mysql_error()); return;}
if(mysql_num_rows($q))
{
echo "<table cellspacing=\"0\" class=\"tableview\">";