Ejemplo n.º 1
0
    def getBlog(self, filter = None):
        parsedFilter = SearchFilter()
        parsedFilter.decode(filter)

        conn = MySQLdb.connect (host = "localhost",
                                user = "******",
                                passwd = "helloall",
                                db = "fydp_db")
        cursor = conn.cursor ()

        select = "SELECT feedurl FROM fydp_db.feeditem " + parsedFilter.toSQL()
        print "select received: %s" % select
        cursor.execute (select)
        row = cursor.fetchone()
        cursor.close ()
        conn.close ()
        return row
Ejemplo n.º 2
0
    def getBlog(self, filter=None):
        parsedFilter = SearchFilter()
        parsedFilter.decode(filter)

        conn = MySQLdb.connect(host="localhost",
                               user="******",
                               passwd="helloall",
                               db="fydp_db")
        cursor = conn.cursor()

        select = "SELECT feedurl FROM fydp_db.feeditem " + parsedFilter.toSQL()
        print "select received: %s" % select
        cursor.execute(select)
        row = cursor.fetchone()
        cursor.close()
        conn.close()
        return row
Ejemplo n.º 3
0
    def getBlogPost(self, filter = None):
        conn = MySQLdb.connect (host = "localhost",
                                user = self.username,
                                passwd = self.password,
                                db = "fydp_db")
        parsedFilter = SearchFilter()
        parsedFilter.decode(filter)

        cursor = conn.cursor ()
        # Write to log!
        select = "SELECT title FROM fydp_db.feeditem " + parsedFilter.toSQL()
        print 'select recieved: %s' % select
        cursor.execute (select)
        #TODO make this read the limit and send that many,
        #TODO call an outside function and return the proper results depending
        # on the link
        row = cursor.fetchone()
        cursor.close ()
        conn.close ()
        return row
Ejemplo n.º 4
0
    def getBlogPost(self, filter=None):
        conn = MySQLdb.connect(host="localhost",
                               user=self.username,
                               passwd=self.password,
                               db="fydp_db")
        parsedFilter = SearchFilter()
        parsedFilter.decode(filter)

        cursor = conn.cursor()
        # Write to log!
        select = "SELECT title FROM fydp_db.feeditem " + parsedFilter.toSQL()
        print 'select recieved: %s' % select
        cursor.execute(select)
        #TODO make this read the limit and send that many,
        #TODO call an outside function and return the proper results depending
        # on the link
        row = cursor.fetchone()
        cursor.close()
        conn.close()
        return row