I, could you tell me if the following global is well coded... I use it to display some posts on my homepage but I have often an error message :
GT::SQL::Table (32144): Wrong argument passed to this subroutine. Usage: Could not create a condition object out of arguments.
at /home/web/cgi-bin/gforum/admin/GT/SQL/Table.pm line 643
Here is the global
sub {
my $tags = shift;
my $post_db = $DB->table ('Post');
$post_db->select_options ('WHERE post_root_id=0', ' AND forum_id_fk NOT IN (7,8)',
'ORDER BY post_time DESC', 'LIMIT 10');
my $sth = $post_db->select;
my @output;
while (my $post = $sth->fetchrow_hashref)
{
push @output, $post;
}
return { post_loop => \@output };
}
Txs
Regards
FMP
GT::SQL::Table (32144): Wrong argument passed to this subroutine. Usage: Could not create a condition object out of arguments.
at /home/web/cgi-bin/gforum/admin/GT/SQL/Table.pm line 643
Here is the global
sub {
my $tags = shift;
my $post_db = $DB->table ('Post');
$post_db->select_options ('WHERE post_root_id=0', ' AND forum_id_fk NOT IN (7,8)',
'ORDER BY post_time DESC', 'LIMIT 10');
my $sth = $post_db->select;
my @output;
while (my $post = $sth->fetchrow_hashref)
{
push @output, $post;
}
return { post_loop => \@output };
}
Txs
Regards
FMP