diff options
author | jfitz <jfitz@FreeBSD.org> | 1997-06-19 03:39:25 +0800 |
---|---|---|
committer | jfitz <jfitz@FreeBSD.org> | 1997-06-19 03:39:25 +0800 |
commit | 19279ff1461050560ed327321c8e8bfe0dcac57b (patch) | |
tree | 6d50d52cb13d4410415aac8d4971f51ca2efbb0c /databases/p5-DBD-mysql/pkg-descr | |
parent | 491b070f4fc1b0c207e48ac0edfa4cd78f10660f (diff) | |
download | freebsd-ports-gnome-19279ff1461050560ed327321c8e8bfe0dcac57b.tar.gz freebsd-ports-gnome-19279ff1461050560ed327321c8e8bfe0dcac57b.tar.zst freebsd-ports-gnome-19279ff1461050560ed327321c8e8bfe0dcac57b.zip |
Import of a perl5 module for accessing MySQL databases
Diffstat (limited to 'databases/p5-DBD-mysql/pkg-descr')
-rw-r--r-- | databases/p5-DBD-mysql/pkg-descr | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/databases/p5-DBD-mysql/pkg-descr b/databases/p5-DBD-mysql/pkg-descr new file mode 100644 index 000000000000..72e2acba0c74 --- /dev/null +++ b/databases/p5-DBD-mysql/pkg-descr @@ -0,0 +1,58 @@ +What you achieve with MysqlPerl +------------------------------ + +MysqlPerl is an interface between the perl programming language and the +MySQL programming API that comes with the MySQL relational database +management system. All functions provided by the MySQL programming API +are supported. + +From perl you activate the interface with the statement + + use Mysql; + +After that you can connect to multiple msql database servers and send +multiple queries to any of them via an simple object oriented +interface. Two types of objects are available: database handles and +statement handles. Perl returns a database handle to the Connect +method like so: + + $dbh = Mysql->connect($hostname,$databasename); + +Once you have connected to a database, you get a statement handle +with: + + $sth = $dbh->query("select foo from bar"); + +You can open as many queries as you like simultaneously by selecting a +different scalar to hold the object: + + $another_sth = $dbh->Query("select bar from foo"); + + +The statement handle allows you to step through the virtual table +returned from the database with the FetchRow method: + + @row = $sth->fetchrow; +or + %hash = $sth->fetchhash; + +You can access all metadata that MySQL supplies for a given table. To +find out the number of rows or the number of fields returned by a +query you simply say: + + $numrows = $sth->numrows; + $numfields = $sth->numfields; + +To find out the size in bytes for the field with the offset 0 (the +first field of a query), you say: + + $length = $sth->length->[0]; + +The list of the names for each column is returned by + + @list => $sth->name; + +As for other metadata available, consult the manpage that comes with +MysqlPerl and study the examples in the file t/msql.t, which is the +extensive testscript to test your installation, but is heavily +commented, so you may use it as a tutorial. |