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