0 as field name causes problems (bug #1042235).
This commit is contained in:
@@ -13,6 +13,8 @@ $Source$
|
||||
#1048826).
|
||||
* main.php, queryframe.php: Handle correctly situation with no default
|
||||
server (bug #1049107).
|
||||
* tbl_create.php, libraries/common.lib.php: 0 as field name causes
|
||||
problems (bug #1042235).
|
||||
|
||||
2004-10-17 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* lang/turkish update, thanks to boralioglu.
|
||||
|
@@ -1352,8 +1352,9 @@ if ($is_minimum_common == FALSE) {
|
||||
*/
|
||||
function PMA_backquote($a_name, $do_it = TRUE)
|
||||
{
|
||||
// '0' is also empty for php :-(
|
||||
if ($do_it
|
||||
&& !empty($a_name) && $a_name != '*') {
|
||||
&& (!empty($a_name) || $a_name == '0') && $a_name != '*') {
|
||||
|
||||
if (is_array($a_name)) {
|
||||
$result = array();
|
||||
|
@@ -55,7 +55,8 @@ if (isset($submit_num_fields)) {
|
||||
} // end for
|
||||
// Builds the fields creation statements
|
||||
for ($i = 0; $i < $field_cnt; $i++) {
|
||||
if (empty($field_name[$i])) {
|
||||
// '0' is also empty for php :-(
|
||||
if (empty($field_name[$i]) && $field_name[$i] != '0') {
|
||||
continue;
|
||||
}
|
||||
$query = PMA_backquote($field_name[$i]) . ' ' . $field_type[$i];
|
||||
|
Reference in New Issue
Block a user