bug 434608

This commit is contained in:
Marc Delisle
2001-06-27 20:11:45 +00:00
parent 65fd312067
commit a6838b8646
5 changed files with 22 additions and 7 deletions

View File

@@ -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__