Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use warnings;
- use DBI;
- use CGI;
- use Try::Tiny;
- my $db = "magnian1_ncls2";
- my $username = "xxx";
- my $password = "yyy";
- my $q = CGI->new;
- print $q->header, $q->start_html('Test: '); try {
- my $dsn = "DBI:mysql:database=$db;host=localhost;";
- my $dbh = DBI->connect($dsn, $username, $password, {RaiseError => 1} );
- my $sth = $dbh->prepare(q{
- SELECT memberid,field,value FROM nucleus_plugin_profile WHERE field = ? AND value = ?;
- });
- $sth->execute("membership",2); } catch { print "Error: $_" }; print $q->end_html
Add Comment
Please, Sign In to add comment