Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

src/z/a/zarkpy-HEAD/web/cgi/modeldecorator/Private.py   zarkpy(Download)
    def _getRealId(self, pri_id):
        query = 'select {$primary_key} from {$table_name} where %s=%%s and %s=%%s'\
                % (self.arguments.user_id_key, self.arguments.primary_key)
        return self.db.fetchFirst(self.replaceAttr(query), [sh.session.id, pri_id])
 

src/z/a/zarkpy-HEAD/web/cgi/modeldecorator/Category.py   zarkpy(Download)
    def deleteCategory(self, name):
        exists = self._getExistsCategory(name)
        ret = self.__getCatModel().delete(exists.id) if exists else 0
        query = self.replaceAttr('update {$table_name} set %s=0 where %s=%%s' % (self.arguments.cat_id_key, self.arguments.cat_id_key) )
        self.db.update(query, exists.id)