How can I append my results in this array so I can use it later ?
var animalQuestion = [(orderlist: Int, questionid:String, question: String, description: String)]()
This is my array which I declared in my class above.
let stmt = try db.prepare("SELECT * FROM allquestion_other where allquestion_other.name= 'animalChoice' and allquestion_other.id NOT IN (select answerresult.questionId FROM answerresult where answerresult.friendUserId='\(friendUserId)')")
for row in stmt {
let orderlist = row[4]
let questionid = row[0]
let question = row[6]
let description = row[7]
animalQuestion.append(orderlist: orderlist, questionid: questionid, question: question, description: description)
}
When i'm running this code , i'm getting the error "Cannot call value of non-function type '[(orderlist: Int, questionid: String, question: String, description: String)]'"
row[4] row [0]row [6]row [7] is returning some values which I need to append in my array