Logo Search packages:      
Sourcecode: mbot version File versions  Download package

def PgNewsHandler::PgNewsHandler::getid (   self,
  table = None 

Get the next available news Id 

Definition at line 43 of file PgNewsHandler.py.

00043                                      :
        """ Get the next available news Id """

        self.log.notice("[PgNewsHandler]: getid")

        # result return a tuple which contains (value,?)  where
        # 'value' is the ID.
        # So we get the value with getresult()[0][0]
        id = conn.query("select currval('%s')" % table).getresult()[0][0]

        self.log.debug("[PgNewsHandler]: getid -> id='%d'" % id)
        return id

    def add_img(self, filename, filetype, filedata, TNfiledata, filesize):

Generated by  Doxygen 1.6.0   Back to index