Avoid precalculating counts.

The count() on array is cheap in PHP and having hardcoded numbers only
tends to break.
This commit is contained in:
Michal Čihař
2010-08-30 14:49:38 +02:00
parent aa45363719
commit 42f04d4a7e

View File

@@ -338,7 +338,7 @@ $PMA_SQPdata_function_name = array (
* *
* @global integer MySQL attributes count * @global integer MySQL attributes count
*/ */
$PMA_SQPdata_function_name_cnt = 299; $PMA_SQPdata_function_name_cnt = count($PMA_SQPdata_function_name);
/* /*
* DEBUG * DEBUG
@@ -391,7 +391,7 @@ $PMA_SQPdata_column_attrib = array (
* *
* @global integer MySQL attributes count * @global integer MySQL attributes count
*/ */
$PMA_SQPdata_column_attrib_cnt = 30; $PMA_SQPdata_column_attrib_cnt = count($PMA_SQPdata_column_attrib);
/** /**
* words that are reserved by MySQL and may not be used as identifiers without quotes * words that are reserved by MySQL and may not be used as identifiers without quotes
@@ -698,7 +698,7 @@ $PMA_SQPdata_reserved_word = array (
* *
* @global integer MySQL reserved words count * @global integer MySQL reserved words count
*/ */
$PMA_SQPdata_reserved_word_cnt = 289; $PMA_SQPdata_reserved_word_cnt = count($PMA_SQPdata_reserved_word);
/** /**
* The previous array must be sorted so that the binary search work. * The previous array must be sorted so that the binary search work.
* Sometimes a word is not added in the correct order, so * Sometimes a word is not added in the correct order, so
@@ -1213,7 +1213,7 @@ $PMA_SQPdata_forbidden_word = array (
* *
* @global integer MySQL forbidden words count * @global integer MySQL forbidden words count
*/ */
$PMA_SQPdata_forbidden_word_cnt = 483; $PMA_SQPdata_forbidden_word_cnt = count($PMA_SQPdata_forbidden_word);
/** /**
* the MySQL column/data types * the MySQL column/data types
@@ -1284,7 +1284,7 @@ $PMA_SQPdata_column_type = array (
* *
* @global integer MySQL column types count * @global integer MySQL column types count
*/ */
$PMA_SQPdata_column_type_cnt = 54; $PMA_SQPdata_column_type_cnt = count($PMA_SQPdata_column_type);
/* /*
* check counts * check counts