Report errors only in primary connection

This commit is contained in:
Jakub Vrana 2010-12-17 18:22:06 +01:00
parent 9eced7872d
commit 0449351a60
2 changed files with 2 additions and 1 deletions

View file

@ -2,6 +2,7 @@
/** Print select result
* @param Min_Result
* @param Min_DB connection to examine indexes
* @param string base link for <th> fields
* @return null
*/
function select($result, $connection2 = null, $href = "") {

View file

@ -216,7 +216,7 @@ function get_rows($query, $connection2 = null, $error = "<p class='error'>") {
while ($row = $result->fetch_assoc()) {
$return[] = $row;
}
} elseif (!$result && $error && defined("PAGE_HEADER")) {
} elseif ($connection->error && $error && defined("PAGE_HEADER")) {
echo $error . error() . "\n";
}
return $return;