diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 39503a5f55..0a1253ec52 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-04-16 Sergio Martin + + * include/db/mysql.php: Fix a bug with the dbresource in the + function that count the result of a query. + 2013-04-16 Miguel de Dios * godmode/agentes/module_manager_editor_network.php, diff --git a/pandora_console/include/db/mysql.php b/pandora_console/include/db/mysql.php index 2f0c0b6b81..debfd4f186 100644 --- a/pandora_console/include/db/mysql.php +++ b/pandora_console/include/db/mysql.php @@ -714,7 +714,9 @@ function mysql_db_get_all_rows_filter ($table, $filter = array(), $fields = fals * @return integer The count of rows of query. */ function mysql_db_get_num_rows ($sql) { - $result = mysql_query($sql); + global $config; + + $result = mysql_query($sql, $config['dbconnection']); if ($result) { return mysql_num_rows($result);