• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..10-Dec-2002-

CGI.pmH A D02-May-200219 KiB895560

Makefile.PLH A D06-Mar-2002300 118

READMEH A D06-Mar-20022.3 KiB7955

README

1
2DBIx::Browse::CGI - Module to browse related tables with a CGI interface.
3(c) Copyright 2000 Evilio Jos� del R�o Silv�n <edelrio@icm.csic.es>
4
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
20
21Description
22-----------
23
24DBIx::Browse::CGI is a module to facilitate the the Web browsing (INSERT,
25UPDATE and DELETE) of related database tables.
26
27
28Build and Install
29-----------------
30
31This module is automatically installed with DBIx::Browse.
32
33
34Usage Overview
35--------------
36
37Basically, you must write a CGI script (whit the use of the CGI
38module) with an active DBI connection. Then you use DBIx::Browse::CGI to
39browse a given table. You can look at the file DemoDBIxBrowse to see
40an example.
41
42         use DBIx::Browse::CGI;
43         my ($dbh, $dbb, $q);
44         $dbh = DBI->connect("DBI:Pg:dbname=enterprise")
45           or croak "Can't connect to database: $@";
46        $q   = new CGI;
47        $dbb = new  DBIx::Browse({
48           dbh => $dbh,
49           table => 'employee',
50           proper_fields => [ qw ( name fname ) ],
51           linked_fields => [ qw ( department category office ) ],
52           linked_tables => [ qw ( department category office ) ],
53           linked_values => [ qw ( name       name     phone  ) ],
54           linked_refs   => [ qw ( id         id       ide    ) ],
55           aliases       => [ qw ( name fname department category phone )],
56           primary_key   => 'id',
57           cgi           => $q
58       });
59        print
60           $q->start_html(
61                          -title => "Test DBIx::Browse"
62                          );
63        $dbb->list_form({
64           field_order  => [  1,  0,  4,  3,  2 ],
65           field_length => [ 14, 15, 15, 15, 10 ]
66        });
67
68       ...etc
69
70
71
72
73
74
75Author
76------
77
78Evilio Jos� del R�o Silv�n <edelrio@icm.csic.es>
79