January 2002
Intermediate to advanced
288 pages
8h 45m
English
sqlSelectHash — returns a hash for a single row of results from a SQL statement
my %hash = $slashdb->sqlSelectHash($select); my %hash = $slashdb->sqlSelectHash($select, $from); my %hash = $slashdb->sqlSelectHash($select, $from, $where); my %hash = $slashdb->sqlSelectHash($select, $from, $where, $other);
sqlSelectHash works exactly the same as
sqlSelectHashRef, except that it creates a hash from the
reference before returning the results. Note that it still returns only the
first row of the result set.
my %user = $selfdb->sqlSelectHash('*', 'users', "uid=$uid");
print "Username: $user{nickname}, homepage: $user{homepage}\n";Read now
Unlock full access