/[fuse_dbi]/trunk/examples/webgui-mysql.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/examples/webgui-mysql.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14 - (show annotations)
Sun Aug 29 20:56:23 2004 UTC (19 years, 7 months ago) by dpavlin
File MIME type: text/plain
File size: 754 byte(s)
working example for MySQL installation of WebGUI

1 #!/usr/bin/perl -w
2
3 use strict;
4 use blib;
5 use Fuse::DBI;
6
7 my $sql_filenames = q{
8 select
9 concat(templateid,name) as id,
10 concat(namespace,'/',name,'.html') as filename,
11 length(template) as size,
12 iseditable as writable
13 from template ;
14 };
15
16 my $sql_read = q{
17 select template
18 from template
19 where concat(templateid,name) = ?;
20 };
21
22 my $sql_update = q{
23 update template
24 set template = ?
25 where concat(templateid,name) = ?;
26 };
27
28 my $mount = shift || '/mnt2';
29
30 my $mnt = Fuse::DBI->mount({
31 filenames => $sql_filenames,
32 read => $sql_read,
33 update => $sql_update,
34 dsn => 'DBI:mysql:dbname=webgui_knjiznice_ffzg_hr',
35 user => 'webgui',
36 password => 'webgui',
37 mount => $mount,
38 });
39
40 print "Press enter to exit...";
41 my $foo = <STDIN>;
42
43 $mnt->umount;

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26