in reply to RFC - A multi table SQL Builder
As for a name, SQL::Bulder? SQL::FromHash?use SQL::Abstract; my $sql = SQL::Abstract->new; my($stmt, @bind) = $sql->select($table, \@fields, \%where, \@order +); my($stmt, @bind) = $sql->insert($table, \%fieldvals || \@values); my($stmt, @bind) = $sql->update($table, \%fieldvals, \%where); my($stmt, @bind) = $sql->delete($table, \%where); # Then, use these in your DBI statements my $sth = $dbh->prepare($stmt); $sth->execute(@bind);
-Mark
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RFC - A multi table SQL Builder
by dragonchild (Archbishop) on Oct 17, 2004 at 22:57 UTC | |
by stvn (Monsignor) on Oct 17, 2004 at 23:47 UTC | |
by bart (Canon) on Oct 18, 2004 at 08:11 UTC |