DBX::Recordset - abstracts a DBX query result
use DBX; $conn = DBX->mysql("database=test;host=localhost;", "", ""); $rs = $conn->query("SELECT * FROM test"); while($rs) { print $rs->field("client") . "\n"; $rs->field("client", "test"); $rs->move_next; }
DBX::Recordset is the heart of the DBX and provides most of its additional functionality. Recordsets are returned by the query method of a DBX::Connection object.
Recordsets support simple forward-only cursors (at the moment) and allow you to easily retrieve and/or modify fields.
Returns a value indicating whether or not the recordset has reached its end. DBX::Recordset overrides the numification operator so that if($rs) is equivalent to if($rs-eof)>.
if($rs)
if($rs-
The field subroutine will return the value of the field named NAME. If a second parameter is passed, then the field with that name will be set to that value. Note that changes made with the field function don't take effect until update() is called or the cursor moves.
Moves the recordset's cursor to the beginning of the set. Works only for random-access cursors. NOT YET IMPLEMENTED.
Moves the recordset's cursor to the previous record. Works only for random-access cursors. NOT YET IMPLEMENTED.
Moves the recordset's cursor to the next record. Works for random-access and forward-only cursors. If the recordset has reached its end, the EOF flag will be set.
Moves the recordset's cursor to the end of the set. Works only for random-access cursors. NOT YET IMPLEMENTED.
Saves changes to the current record. update is automatically called when the cursor is moved.
update
Requires DBX and all of its dependencies
DBI, DBX, DBX::Connection
Bill Atkins, <dbxNOSPAM@batkins.com>
Copyright 2003 by Bill Atkins
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install DBX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBX
CPAN shell
perl -MCPAN -e shell install DBX
For more information on module installation, please visit the detailed CPAN module installation guide.