I am pretty sure DBI is connecting but not pulling anything from DB could anyone take a look at this?
Code:
sub EVENT_SAY
{
if ($text =~/read/i)
{
### Read from DB
#if(!$connect){ $connect = plugin::LoadMysql(); }
$connect = plugin::LoadMysql();
$query = "SELECT
data_buckets.key
data_buckets.value
FROM
peq.data_buckets";
$query_handle = $connect->prepare($query);
$query_handle->execute();
my $key_name;
my $key_value;
while(($key_name,$key_value) = $query_handle->fetchrow())
{
quest::say(" babling $key_name,$key_value");
}
}
}
thank you!