* fixed php warnings (see bug #521751).

* fixed bug #521589 - float(4,2) and field length.
This commit is contained in:
Loïc Chapeaux
2002-02-23 10:49:43 +00:00
parent b0704a125a
commit f6ae0be900
4 changed files with 31 additions and 19 deletions

View File

@@ -5,6 +5,12 @@ phpMyAdmin - Changelog
$Id$
$Source$
2002-02-22 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* tbl_addfield.php3, lines 34-44; tbl_create.php3, lines 40-50: fixed php
warnings (see bug #521751).
* tbl_change.php3, lines 166-168: fixed bug #521589 - float(4,2) and field
length.
2002-02-22 Marc Delisle <lem9@users.sourceforge.net>
* lang/catala.inc.php3 updates, thanks to Xavier Navarro
(xnavarro at hidrogen.com)

View File

@@ -31,15 +31,17 @@ if (isset($submit)) {
// Transforms the radio button field_key into 3 arrays
$field_cnt = count($field_name);
for ($i = 0; $i < $field_cnt; ++$i) {
if (${'field_key_' . $i} == 'primary_' . $i) {
$field_primary[] = $i;
}
if (${'field_key_' . $i} == 'index_' . $i) {
$field_index[] = $i;
}
if (${'field_key_' . $i} == 'unique_' . $i) {
$field_unique[] = $i;
}
if (isset(${'field_key_' . $i})) {
if (${'field_key_' . $i} == 'primary_' . $i) {
$field_primary[] = $i;
}
if (${'field_key_' . $i} == 'index_' . $i) {
$field_index[] = $i;
}
if (${'field_key_' . $i} == 'unique_' . $i) {
$field_unique[] = $i;
}
} // end if
} // end for
// Builds the field creation statement and alters the table
for ($i = 0; $i < $field_cnt; ++$i) {

View File

@@ -163,7 +163,9 @@ for ($i = 0; $i < $fields_cnt; $i++) {
if ($row_table_def['Type'] == 'datetime' && empty($row[$field])) {
$row[$field] = date('Y-m-d H:i:s', time());
}
$len = @mysql_field_len($result, $i);
$len = (eregi('float|double', $row_table_def['Type']))
? 100
: @mysql_field_len($result, $i);
$first_timestamp = 0;
$bgcolor = ($i % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;

View File

@@ -37,15 +37,17 @@ if (isset($submit)) {
// Transforms the radio button field_key into 3 arrays
$field_cnt = count($field_name);
for ($i = 0; $i < $field_cnt; ++$i) {
if (${'field_key_' . $i} == 'primary_' . $i) {
$field_primary[] = $i;
}
if (${'field_key_' . $i} == 'index_' . $i) {
$field_index[] = $i;
}
if (${'field_key_' . $i} == 'unique_' . $i) {
$field_unique[] = $i;
}
if (isset(${'field_key_' . $i})) {
if (${'field_key_' . $i} == 'primary_' . $i) {
$field_primary[] = $i;
}
if (${'field_key_' . $i} == 'index_' . $i) {
$field_index[] = $i;
}
if (${'field_key_' . $i} == 'unique_' . $i) {
$field_unique[] = $i;
}
} // end if
} // end for
// Builds the fields creation statements
for ($i = 0; $i < $field_cnt; $i++) {