Changeset 85
- Timestamp:
- 05/10/09 20:09:30 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm
r82 r85 133 133 sub new { 134 134 my ($class, $base, $id) = @_; 135 my $sth = $base->db->prepare_cached( 136 sprintf(q{select 1 from %s where %s = ?}, 137 $base->db->quote_identifier($class->object_table), 138 $base->db->quote_identifier($class->key_field), 139 ), 140 ); 141 my $count = $sth->execute($id); 142 $sth->finish; 143 $count == 1 or return; 135 144 bless({ _id => $id, _base => $base }, $class); 136 145 }
Note: See TracChangeset
for help on using the changeset viewer.