嗨,我正在用节点JS处理mysql数据库。大部分数据被插入,但此时查询仍然无法执行,我不知道为什么。我尝试了
这是我的问题
null
ms_connect.query("INSERT INTO `companies_jobs` VALUES (null, '"+mysql.escape(data[i].title)+"','"+mysql.escape(data[i].link)+"','"+mysql.escape(data[i].date)+"','"+mysql.escape(data[i].level)+"','"+mysql.escape(data[i].category)+"','"+mysql.escape(data[i].function)+"','"+mysql.escape(data[i].loc)+"','"+mysql.escape(data[i].timing)+"','"+mysql.escape(data[i].company)+"','"+JSON.stringify(time)+"','"+JSON.stringify(date)+"',"+1+")", function(err, row){
if(err){
console.log(data[i]);
throw err;
} else{
i++;
s();
}
})
null
我正在尝试将此数据插入数据库:
null
[{
category: 'Sales',
company: '',
date: 'Posted on 12/06/2018',
function: '',
level: 'Students',
link: 'https://career5.successfactors.eu/career?career%5fns=job%5flisting&company=LiMySLive&navBarLevel=JOB%5fSEARCH&rcm%5fsite%5flocale=en%5fUS&career_job_req_id=13305&selected_lang=es_ES&jobAlertController_jobAlertId=&jobAlertController_jobAlertName=&_s.crb=fl08QG2oV1akJFW%2fWVQ4Ol50v%2bs%3d',
loc: 'Chile (CL)',
timing: 'full time',
title: 'Alumno en Practica'
}]
null
但是由于某种原因,我得到了这个错误:
ER_PARSE_ERROR:您的SQL语法中有一个错误;请检查与MySQL server版本相对应的手册,以确定在第1行的'alumno en practica','https://career5.successfactors.eu/career?career5fns=job'附近使用的正确语法
表结构如下:
看起来