如何在mysql插入查询中插入变量值?
我已经在存储过程中编写了一个插入查询如何在mysql插入查询中插入变量值?,mysql,Mysql,我已经在存储过程中编写了一个插入查询 INSERT INTO `ascencom_soa2`.`rardata` (`threatDescription`,`rtpControlObjective`, `rtpNonTechnical`,`rtpISOControl`, `rtpWorkInstructions`,`VulnerabilityDescription`, `assetname`,`companyid`,`assetid`) VALUES (threatDes
INSERT INTO `ascencom_soa2`.`rardata` (`threatDescription`,`rtpControlObjective`,
`rtpNonTechnical`,`rtpISOControl`,
`rtpWorkInstructions`,`VulnerabilityDescription`,
`assetname`,`companyid`,`assetid`)
VALUES (threatDesc,rtpcontrol,
rtpNon,rtpISO,
rtpWork,rtpvulnarabilityDesc,
idAsset,idCompany,idAssetType);
此处threatDesc、rtpcontrol、trpNon….
是变量,在执行插入查询之前进行初始化
但这是给我的错误
1054:“字段列表”中的未知列“threatDesc”
请帮助我解决此问题这意味着没有列threatDesc,因此您无法将其指定为值。我的猜测是,您可能想在其周围加引号并将其保存为字符串,或者您试图从另一个表中赋值,您需要说tableName.threatDesc或其他完全不同的内容 您是在MySQL客户机内还是通过PHP来实现这一点?
@threatDesc, @rtpcontrol, @trpNon...