#NEWLINE# def article_exists( self , group_name , style , range ) : #NEWLINE# #INDENT# forum_id = self . get_forum ( group_name ) #NEWLINE# stmt = ( '\n                SELECT\n                    COUNT(*) AS total\n                FROM\n                    %sposts\n                WHERE\n                    forum_id=%s' % ( settings . phpbb_table_prefix , forum_id ) ) #NEWLINE# if ( style == 'range' ) : #NEWLINE# #INDENT# stmt = ( '%s AND post_id > %s' % ( stmt , range [ 0 ] ) ) #NEWLINE# if ( len ( range ) == 2 ) : #NEWLINE# #INDENT# stmt = ( '%s AND post_id < %s' % ( stmt , range [ 1 ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# stmt = ( '%s AND post_id = %s' % ( stmt , range [ 0 ] ) ) #NEWLINE# #UNINDENT# self . cursor . execute ( stmt ) #NEWLINE# return self . cursor . fetchone ( ) [ 0 ]