SQL> create table mje(mac varchar(10), comment varchar(10));
SQLRowCount returns -1
SQL> insert into mje values('1226', 'comment1');
SQLRowCount returns 1
SQL> insert into mje values('1226', 'comment2');
SQLRowCount returns 1
SQL> insert into mje values('1226', 'comment3');
SQLRowCount returns 1
SQL> select * from mje;
+-----------+-----------+
| mac | comment |
+-----------+-----------+
| 1226 | comment1 |
| 1226 | comment2 |
| 1226 | comment3 |
+-----------+-----------+
SQLRowCount returns -1
3 rows fetched
SQL>
####
perl -le 'use DBI; my $h = DBI->connect;nect; my $r = $h->selectall_hashref(q/select * from mje/, "mac"); use Data::Dumper; print Dumper($r);'
$VAR1 = {
'1226' => {
'comment' => 'comment3',
'mac' => '1226'
}
};
##
##
perl -le 'use DBI; my $h = DBI->connect;nect; my $r = $h->selectall_arrayref(q/select * from mje/); use Data::Dumper; print Dumper($r);'
$VAR1 = [
[
'1226',
'comment1'
],
[
'1226',
'comment2'
],
[
'1226',
'comment3'
]
];