如何对 SQL 查询进行转义以避免SQL 注入?
def getStackArea(screen_area):
db = postgresql.open(db_conf.connectionString())
data = db.query("select stack_area from screen_coordinates where screen_area = " + screen_area + " and active = 1")
return data[0]['stack_area']