Use TRUNCATE when using MySQL 4 (bug #748792).

This commit is contained in:
Michal Čihař
2003-06-04 11:48:15 +00:00
parent 3a6933200e
commit 31c5474400
2 changed files with 9 additions and 2 deletions

View File

@@ -196,8 +196,12 @@ else if ($mult_btn == $strYes) {
break;
case 'empty_tbl':
$a_query = 'DELETE FROM '
. PMA_backquote(urldecode($selected[$i]));
if (PMA_MYSQL_INT_VERSION >= 40000) {
$a_query .= 'TRUNCATE ';
} else {
$a_query .= 'DELETE FROM ';
}
$a_query .= PMA_backquote(htmlspecialchars(urldecode($selected[$i])))
break;
case 'drop_fld':