M1-Arborator-NaijaSUD/arborator/lib/database.py
def treesForSentence(self,sid, dbcrsr=None):
		"""
		treeid,uid,user,realname,timestamp for a sentenceid
		"""
		if dbcrsr:	db,cursor=dbcrsr
		else:		db,cursor=self.open() 
		cursor.execute("""select trees.rowid, trees.userid, users.user, users.realname, trees.timestamp
					from trees, users
					where users.rowid=trees.userid and trees.sentenceid=?;""",(sid,))
		result = list(cursor.fetchall())
		if not dbcrsr: db.close()
		return result

		treeid,uid,user,realname,timestamp for a sentenceid
		
treeid,uid,user,realname,timestamp for a sentenceid
treeid uid user realname timestamp for a sentenceid
def treesForSentence(self,sid, dbcrsr=None):
		if dbcrsr:	db,cursor=dbcrsr
		else:		db,cursor=self.open() 
		cursor.execute("""select trees.rowid, trees.userid, users.user, users.realname, trees.timestamp
					from trees, users
					where users.rowid=trees.userid and trees.sentenceid=?;""",(sid,))
		result = list(cursor.fetchall())
		if not dbcrsr: db.close()
		return result
def treesForSentence ( self , sid , dbcrsr = None ) : if dbcrsr : db , cursor = dbcrsr else : db , cursor = self . open ( ) cursor . execute ( """select trees.rowid, trees.userid, users.user, users.realname, trees.timestamp
					from trees, users
					where users.rowid=trees.userid and trees.sentenceid=?;""" , ( sid , ) ) result = list ( cursor . fetchall ( ) ) if not dbcrsr : db . close ( ) return result
treeid,uid,user,realname,timestamp for a sentenceid
treeid uid user realname timestamp for a sentenceid
"""
		treeid,uid,user,realname,timestamp for a sentenceid
		"""
self
sid
dbcrsr