Update of /cvsroot/phpwebapp/web_app/database
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18842
Modified Files:
class.EditableRS.php class.Recordset.php
Log Message:
Index: class.EditableRS.php
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/database/class.EditableRS.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** class.EditableRS.php 25 Aug 2003 13:18:32 -0000 1.6
--- class.EditableRS.php 29 Jan 2004 08:28:37 -0000 1.7
***************
*** 231,234 ****
--- 231,254 ----
}
}
+
+ /**
+ * Change the name of a column.
+ */
+ function renameCol($fld_name, $new_fld_name)
+ {
+ if (isset($this->content[0][$new_fld_name]))
+ {
+ $msg = "EditableRS::renameCol(): there is already"
+ . " a field named '$new_fld_name'.\n";
+ print WebApp::error_msg($msg);
+ return;
+ }
+
+ for ($i=0; $i < $this->count; $i++)
+ {
+ $this->content[$i][$new_fld_name] = $this->content[$i][$fld_name];
+ unset($this->content[$i][$fld_name]);
+ }
+ }
}
?>
\ No newline at end of file
Index: class.Recordset.php
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/database/class.Recordset.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** class.Recordset.php 8 Sep 2003 13:18:24 -0000 1.8
--- class.Recordset.php 29 Jan 2004 08:28:37 -0000 1.9
***************
*** 81,85 ****
}
! /** Returns the value of the field given as parameter. */
function Field($fld_name)
{
--- 81,88 ----
}
! /**
! * Returns the value of the given field.
! * Returns UNDEFINED if there is no such field, or EOF or BOF.
! */
function Field($fld_name)
{
|