--- loncom/interface/lonmysql.pm 2003/03/13 19:08:52 1.9 +++ loncom/interface/lonmysql.pm 2003/03/14 15:37:02 1.10 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # MySQL utility functions # -# $Id: lonmysql.pm,v 1.9 2003/03/13 19:08:52 matthew Exp $ +# $Id: lonmysql.pm,v 1.10 2003/03/14 15:37:02 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -396,6 +396,26 @@ sub number_of_rows { return undef if (! defined(&update_table_info($table_id))); return $Tables{&translate_id($table_id)}->{'Rows'}; } +############################### + +=pod + +=item &get_dbh() + +Input: nothing + +Returns: the database handler, or undef on error. + +This routine allows the programmer to gain access to the database handler. +Be careful. + +=cut + +############################### +sub get_dbh { + return undef if (! defined(&connect_to_db())); + return $dbh; +} ###############################