Logo Search packages:      
Sourcecode: zope-cmfpgforum version File versions

tuple CMFpgForum::sql::SQLMethods::posting_delete_and_update_parents_sql [static, inherited]

Initial value:

RoutableSqlMethod(
        'posting_delete_and_update_parents_sql',
        '',
        '''
POSTING_ID=""
''',
        '''
update POSTING set NUMBER_OF_REPLIES = NUMBER_OF_REPLIES -1 where POSTING_ID =
(select THREAD_ID from POSTING where POSTING_ID = <dtml-var "_.int(POSTING_ID)">)

<dtml-var sql_delimiter>

update POSTING set NUMBER_OF_REPLIES = NUMBER_OF_REPLIES -1 where POSTING_ID =
(select POSTING.PARENT_ID from POSTING where POSTING.POSTING_ID = <dtml-var "_.int(POSTING_ID)">
  and POSTING.PARENT_ID != POSTING.THREAD_ID)

<dtml-var sql_delimiter>

delete from POSTING where POSTING_ID = <dtml-var "_.int(POSTING_ID)">

<dtml-var sql_delimiter>

delete from POSTING_KEYWORD where POSTING_ID = <dtml-var "_.int(POSTING_ID)">

<dtml-var sql_delimiter>

COMMIT

''')

Definition at line 570 of file sql.py.


Generated by  Doxygen 1.6.0   Back to index