APLTemplate error code (Can't locate object method "affected_rows" via package "DBI::st" at (eval 192) line 11. ) $articles::page_items_number = 0; $articles::code = ''; my @code = (); $articles::cur_id = $object::cgi->param('id'); my $page = $object::cgi->param('page'); my $code = " select * from ".($variables::language_current)."_article_data where public = 1 and type = '$articles::cur_cat_id' and id = '$articles::cur_id' "; my $sth = SQL::MySqlLayer->query( $object::sql, $code); return if !defined $sth || $sth->affected_rows < 1; my %data = SQL::MySqlLayer->get_hash($sth); push @code, '

'.( $data{'title'} ).'

'; push @code, ''.( $data{'text'} ); my %h = (); my $link = ''; $h{'page'} = $page if $page > 1; $link = MISC::Html->add_url_params("$variables::page_current_data{'url'}", %h); push @code, qq~~; push @code, qq~~; push @code, '
~; ### push @code, qq~

Вернуться

~; push @code, qq~

~; push @code, ''.( MISC::Date->time2string($data{'date'}) ) if $data{'date'} > 1000; push @code, qq~

'; $articles::pages_link = ''.( $variables::page_current_data{'url'} ).'?group='.( $articles::cur_cat_id ).'&page='.($page); $articles::code = join "\n", @code; $variables::template_changes{'%META_KEYWORDS%'} = $data{'meta_keywords'} if ( defined $data{'meta_keywords'} && length $data{'meta_keywords'} > 5 ); $variables::template_changes{'%META_DESCRIPTION%'} = $data{'meta_description'} if ( defined $data{'meta_description'} && length $data{'meta_description'} > 5 ); $variables::template_changes{'%HEAD_TITLE%'} = "$variables::page_current_data{'title_browser'} - $data{'title'}";