January 2002
Intermediate to advanced
288 pages
8h 45m
English
sqlSelectArrayRef — returns one row as an array reference from an executed SQL statement
my $arrref = $slashdb->sqlSelectArrayRef($select); my $arrref = $slashdb->sqlSelectArrayRef($select, $from); my $arrref = $slashdb->sqlSelectArrayRef($select, $from, $where); my $arrref = $slashdb->sqlSelectArrayRef($select, $from, $where, $other);
sqlSelectArrayRef constructs and executes a SQL
statement from its parameters. It takes the same parameters as
sqlSelect and handles failures in the same way. If it
succeeds, it returns a reference to an array of the fields of the first row
selected from the database.
my $userref = $slashdb->sqlSelectArrayRef('nickname, realemail', 'users',
"uid=$uid");
print "Username: $userref->[0], address: $userref->[1]\n";Read now
Unlock full access