[英]MySQl Error #1064 Syntax error
I get this error: 我收到此错误:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4 SQL=SELECT company.contactname AS name, company.contactemail AS email, job.title, job.sendemail FROM `kecobo_js_job_companies` AS company JOIN `kecobo_js_job_jobs` AS job ON job.companyid = company.id WHERE job.id =
with this query: 与此查询:
$jobquery = "SELECT company.contactname AS name, company.contactemail AS email, job.title, job.sendemail
FROM `#__js_job_companies` AS company
JOIN `#__js_job_jobs` AS job ON job.companyid = company.id
WHERE job.id = ".$jobid;
Does anybody has a suggestion what could be wrong? 有人有什么建议吗?
$jobquery = "SELECT company.contactname AS name, company.contactemail AS email, job.title, job.sendemail
FROM `#__js_job_companies` AS company
JOIN `#__js_job_jobs` AS job ON job.companyid = company.id
WHERE job.id = '".$jobid."'";
Consider injection issuses 考虑注射问题
Consider using MySQLi or PDO. 考虑使用MySQLi或PDO。 As for your question
$jobid
is empty you can see it in you query ending in equal sign. 至于您的问题
$jobid
为空,您可以在查询中以等号结尾的地方看到它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.