Konstrukt
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Konstrukt/Doc/Tutorial/Plugin/Note/DBI.pod view on Meta::CPAN
sub add_note {
my ($self, $text) = @_;
my $dbh = $Konstrukt::DBI->get_connection(@{$self->{db_settings}}) or return undef;
$text = $dbh->quote($text);
return $dbh->do("INSERT INTO note(text) VALUES($text)");
}
sub update_note {
my ($self, $id, $text) = @_;
my $dbh = $Konstrukt::DBI->get_connection(@{$self->{db_settings}}) or return undef;
$id = $dbh->quote($id);
$text = $dbh->quote($text);
return $dbh->do("UPDATE note SET text = $text WHERE id = $id");
}
sub delete_note {
lib/Konstrukt/Plugin/blog/DBI.pm view on Meta::CPAN
=item * $content - The entry's content
=item * $private - Is this entry only visible to the author?
=item * $update - Update the publication date to "now"
=back
=cut
sub update_entry {
my ($self, $id, $title, $description, $content, $private, $update) = @_;
my $dbh = $Konstrukt::DBI->get_connection(@{$self->{db_settings}}) or return undef;
#quoting
$title = $dbh->quote($title || '');
$description = $dbh->quote($description || '');
$content = $dbh->quote($content || '');
$private = $dbh->quote($private || 0);
lib/Konstrukt/Plugin/bookmarks/DBI.pm view on Meta::CPAN
=item * $title - The title of this bookmark
=item * $private - Is this entry only visible to me?
=item * $category - To which category does this entry belong?
=back
=cut
sub update_entry {
my ($self, $id, $url, $title, $private, $category) = @_;
my $dbh = $Konstrukt::DBI->get_connection(@{$self->{db_settings}}) or return undef;
#quoting
$title = $dbh->quote($title || '');
$url = $dbh->quote($url || '');
$private ||= 0;
$category ||= 0;
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.199 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )