Gossamer Forum
Home : Products : DBMan SQL : Development, Plugins and Globals :

Re: [delicia] real name in user table

Quote Reply
Re: [delicia] real name in user table In reply to
i figured out number 1 by using another thread:
Code:
sub {
my ($table, $field, $value) = @_;
my $sth = $DB->table($table)->select({ $field => $value });
my @output;
while (my $rs = $sth->fetchrow_hashref ) {
push @output, $rs;
}
return { loop_hash => \@output };
}


however, this looks like a one-to-many relationship and my purpose will always be one-to-one. i think i should get rid of the while, but probably need a different statement to get the one record that matches my username. what should i change?

and i still need help with #2. thanks
Subject Author Views Date
Thread real name in user table delicia 6023 Aug 1, 2010, 5:59 AM
Post Re: [delicia] real name in user table
delicia 5832 Aug 1, 2010, 9:53 AM