I am making an agenda for myself (without any security). To add, delete or update I use GET to notify the server that I am adding a task. The address would be this:
Afterwards, to get the query in node.js, I use this code:
if (url_parts.pathname == "/update") {
var start = url_parts.query.start;
var end = url_parts.query.end;
var status = url_parts.query.status;
var by = url_parts.query.by;
var title = url_parts.query.title;
var content = url_parts.query.content;
var to = url_parts.query.to;
var priority = url_parts.query.priority;
var color = url_parts.query.color;
var qid = url_parts.query.qid;
db.run("UPDATE todo SET id="+qid+",start="+start+",end="+end+",title=\""+title+"\", content=\""+content+"\", status=\""+status+"\", importance="+priority+", user=\""+to+"\", by=\""+by+"\", color=\""+color+"\" WHERE id="+qid);
res.end();
}
The update function works perfectly. The only problem is that the two new fields I added today ( qid and status ) return undefined . The error persists after restarting the computer and node. What can cause the problem? Thank you very much.