bug 434608
This commit is contained in:
11
lib.inc.php3
11
lib.inc.php3
@@ -303,7 +303,8 @@ function display_table ($dt_result, $is_simple = false) {
|
||||
|
||||
$primary = false;
|
||||
if(!$is_simple && !empty($table) && !empty($db)) {
|
||||
$result = mysql_query("SELECT COUNT(*) as total FROM " .db_name($db).".$table") or mysql_die();
|
||||
$result = mysql_query("SELECT COUNT(*) as total FROM " .db_name($db).
|
||||
"." . tbl_name($table)) or mysql_die();
|
||||
$row = mysql_fetch_array($result);
|
||||
$total = $row["total"];
|
||||
}
|
||||
@@ -917,6 +918,14 @@ function db_name ($db) {
|
||||
else return $db;
|
||||
}
|
||||
|
||||
function tbl_name ($tbl) {
|
||||
if (MYSQL_MAJOR_VERSION >= "3.23"
|
||||
&& intval(MYSQL_MINOR_VERSION) >= 6) {
|
||||
return "`" . $tbl . "`";
|
||||
}
|
||||
else return $tbl;
|
||||
}
|
||||
|
||||
include ("./defines.inc.php3");
|
||||
|
||||
} // $__LIB_INC__
|
||||
|
Reference in New Issue
Block a user