Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($arg =~ /^MySQL\s(\S*\s*)+/i) {
- $arg =~ s/!MySQL //;
- use Mysql;
- sub mysql_query {
- my $host="localhost";
- my $database="titantopsites";
- my $user="root";
- my $password="***";
- $db = Mysql->connect($host, $database, $user, $password);
- $db->selectdb($database);
- $query = $db->query($arg);
- while (%hash = $query->fetchhash) {
- $conn->privmsg($conn->{channel}, $hash{'egy'}.' egy oszlop eredmenye');
- $conn->privmsg($conn->{channel}, $hash{'ketto'}.' ketto oszlop eredmenye');
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement