Catalog
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Catalog/db.pm view on Meta::CPAN
sub instance { shift->{'instance'}; }
sub quote { shift->instance()->quote(@_); }
sub date { shift->instance()->date(@_); }
sub datetime { shift->instance()->datetime(@_); }
sub connect { shift->instance()->connect(@_); }
sub logoff { shift->instance()->logoff(@_); }
sub insert { shift->instance()->insert(@_); }
sub dict_update { shift->instance()->dict_update(@_); }
sub mdelete { shift->instance()->mdelete(@_); }
sub update { shift->instance()->update(@_); }
sub tables { shift->instance()->tables(@_); }
sub table_exists { shift->instance()->table_exists(@_); }
sub databases { shift->instance()->databases(@_); }
sub exec_info { shift->instance()->exec_info(@_); }
sub exec { shift->instance()->exec(@_); }
sub select { shift->instance()->select(@_); }
sub exec_select_one { shift->instance()->exec_select_one(@_); }
sub table_schema { shift->instance()->table_schema(@_); }
sub info_table { shift->instance()->info_table(@_); }
sub exec_select { shift->instance()->exec_select(@_); }
lib/Catalog/db/mysql.pm view on Meta::CPAN
my($base) = $self->connect();
my($sql) = "delete from $table where $where";
dbg($sql, "mysql");
my($stmt) = $base->prepare("$sql");
error("cannot prepare $sql : " . $base->errstr()) if(!defined($stmt));
$stmt->execute() or error("cannot execute $sql: " . $base->errstr());
$stmt->finish();
}
sub update {
my($self, $table, $where, %values) = @_;
if(defined($where) && $where ne '') {
$where = " where $where ";
}
my($info) = $self->info_table($table);
my(%dict);
my($set) = join(", ", map {
#
# Remove external dict with multiple values and memorize for
lib/Catalog/tools/fulcrum.pm view on Meta::CPAN
my($sql) = "insert into $table ( $fields ) values ( $values )";
dbg("$sql", "fulcrum");
my($stmt) = $base->prepare("$sql");
error("cannot prepare $sql : " . $base->errstr()) if(!defined($stmt));
$stmt->execute() or error("cannot execute $sql: " . $base->errstr());
$self->{'insertid'} = $stmt->{'ful_last_row_id'};
$stmt->finish();
return $self->{'insertid'};
}
sub update {
my($self, $table, $where, %values) = @_;
my($set) = join(", ", map { $values{$_} =~ s/\'/\'\'/g; "$_ = '$values{$_}'"; } sort(keys(%values)));
my($sql) = "update $table set $set where $where";
dbg($sql, "fulcrum");
my($base) = $self->connect();
my($stmt) = $base->prepare("$sql");
error("cannot prepare $sql : " . $base->errstr()) if(!defined($stmt));
$stmt->execute() or error("cannot execute $sql: " . $base->errstr());
$stmt->finish();
lib/Catalog/tools/sqledit.pm view on Meta::CPAN
$assoc->{'_EDITCOMMENT_'} = $cgi->param('comment') if($cgi->param('comment'));
if(exists($assoc->{'_DEFAULT_'})) {
$assoc->{'_DEFAULT_'} = $self->row2edit($table, $row);
} else {
$self->row2assoc($table, $row, $assoc);
}
return $self->stemplate_build($template);
}
sub update_hook {
dbg("sqledit:update_hook\n", "sqledit");
}
sub update_check {
my($self, $field, $value) = @_;
return $value;
}
sub args2row {
my($self, $table) = @_;
my($cgi) = $self->{'cgi'};
my(%row);
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.975 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )