So I got it working again and figured out the bug...
Change this line (in the global):
to this:
my $condition = GT::SQL::Condition->new('used_ips', 'LIKE', '%'.$ip.'%');
my $sth = $db->select(['used_ips'], $condition, {ID => $id}) or die $GT::SQL::error;
my $voted = $sth->fetchrow_hashref();
If anyone knows a less complicated way than those 3 lines, please post it.
Now go have fun now,
- Jonathan
Change this line (in the global):
Code:
my $voted = $db->do("SELECT used_ips WHERE used_ips LIKE '%".$ip."%' AND ID='".$id."' ");to this:
Code:
my $condition = GT::SQL::Condition->new('used_ips', 'LIKE', '%'.$ip.'%');
my $sth = $db->select(['used_ips'], $condition, {ID => $id}) or die $GT::SQL::error;
my $voted = $sth->fetchrow_hashref();
If anyone knows a less complicated way than those 3 lines, please post it.
Now go have fun now,
- Jonathan