--- loncom/interface/lonmysql.pm 2004/12/20 19:53:36 1.25 +++ loncom/interface/lonmysql.pm 2005/02/09 21:21:08 1.26 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # MySQL utility functions # -# $Id: lonmysql.pm,v 1.25 2004/12/20 19:53:36 matthew Exp $ +# $Id: lonmysql.pm,v 1.26 2005/02/09 21:21:08 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1182,7 +1182,22 @@ sub drop_table { return 1; # if we got here there was no error, so return a 'true' value } +########################################## +=pod + +=item fix_table_name + +Fixes a table name so that it will work with MySQL. + +=cut + +########################################## +sub fix_table_name { + my ($name) = @_; + $name =~ s/^(\d+e\d+)/_$1/; + return $name; +} # ---------------------------- convert 'time' format into a datetime sql format