--- loncom/lonsql 2003/07/30 16:49:27 1.57 +++ loncom/lonsql 2004/05/03 16:20:57 1.58 @@ -3,7 +3,7 @@ # The LearningOnline Network # lonsql - LON TCP-MySQL-Server Daemon for handling database requests. # -# $Id: lonsql,v 1.57 2003/07/30 16:49:27 www Exp $ +# $Id: lonsql,v 1.58 2004/05/03 16:20:57 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -41,42 +41,6 @@ Note that a lonsql.pid file contains the =head1 OVERVIEW -The SQL database in LON-CAPA is used for catalog searches against -resource metadata only. The authoritative version of the resource -metadata is an XML-file on the normal file system (same file name as -resource plus ".meta"). The SQL-database is a cache of these files, -and can be reconstructed from the XML files at any time. - -The current database is implemented assuming a non-adjustable -architecture involving these data fields (specific to each version of -a resource). - -=over 4 - -=item * title - -=item * author - -=item * subject - -=item * notes - -=item * abstract - -=item * mime - -=item * language - -=item * creationdate - -=item * lastrevisiondate - -=item * owner - -=item * copyright - -=back - =head2 Purpose within LON-CAPA LON-CAPA is meant to distribute A LOT of educational content to A LOT @@ -139,6 +103,7 @@ use strict; use lib '/home/httpd/lib/perl/'; use LONCAPA::Configuration; +use LONCAPA::lonmetadata(); use IO::Socket; use Symbol; @@ -511,8 +476,9 @@ sub do_sql_query { #prepare and execute the query my $sth = $dbh->prepare($query); unless ($sth->execute()) { - &logthis("WARNING: ". - "Could not retrieve from database: $@"); + &logthis(''. + 'WARNING: Could not retrieve from database:'. + $sth->errstr().''); } else { my $aref=$sth->fetchall_arrayref; foreach my $row (@$aref) { @@ -971,17 +937,6 @@ sub DISCONNECT { } - - - - - - - - - -# ----------------------------------- POD (plain old documentation, CPAN style) - =pod =back