From: John F. <jo...@us...> - 2009-11-23 11:29:52
|
Update of /cvsroot/ingex/ingex/studio/web/WebIngex/ingex-config In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32020 Modified Files: prodautodb.pm Log Message: Ability to load possible file formats from database Index: prodautodb.pm =================================================================== RCS file: /cvsroot/ingex/ingex/studio/web/WebIngex/ingex-config/prodautodb.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** prodautodb.pm 8 Oct 2008 10:16:07 -0000 1.4 --- prodautodb.pm 23 Nov 2009 11:29:42 -0000 1.5 *************** *** 56,59 **** --- 56,60 ---- &load_video_resolutions &load_video_resolution + &load_file_formats &load_nodes &load_node *************** *** 233,236 **** --- 234,269 ---- #################################### # + # File Formats + # + #################################### + + sub load_file_formats + { + my ($dbh) = @_; + + my $fmts; + eval + { + my $sth = $dbh->prepare(" + SELECT fft_identifier AS id, + fft_name AS name + FROM FileFormat + "); + $sth->execute; + + $fmts = $sth->fetchall_arrayref({}); + }; + if ($@) + { + $errstr = (defined $dbh->errstr) ? $dbh->errstr : "unknown error"; + return undef; + } + + return $fmts; + } + + + #################################### + # # Recording Locations # |