INSERT INTO `#__vc_transactions` SET `title`='现金币' , `units`='3' , `txn_id`='5FF0BDB3C815A69C' , `txn_amount`='3' , `txn_currency`='CNY' , `txn_status`='pending' , `txn_date`='2016-12-23 06:32:38' , `extra_data`=NULL , `service_provider`='System' , `service_alias`='' , `item_id`='2' , `item_type`='currency' , `sender_id`='0' , `receiver_id`='50' , `custom_price`='0' , `order_status`='transfer' , `transfer_type`='1' , `bank`='1'
但同时另一个替代查询如下,可以在mysql数据库中记录。
INSERT INTO `#__vc_transactions` SET `title`='现金币' , `units`='50' , `txn_id`='8DE6C35ED5CD9569' , `txn_amount`='45' , `txn_currency`='CNY' , `txn_status`='completed' , `txn_date`='2016-12-23 06:32:00' , `extra_data`='手续费:5' , `service_provider`='System' , `service_alias`='' , `item_id`='2' , `item_type`='currency' , `sender_id`='50' , `receiver_id`='47' , `custom_price`='0' , `order_status`='transfer' , `transfer_type`='2' , `bank`='0'
为什么?第一个查询的问题是什么?
更新 此外,我更改了另一个查询语句,结果是相同的,问题是相同的 它的工作原理如下:
INSERT INTO `#__vc_transactions` (`title`,`units`,`txn_id`,`txn_amount`,`txn_currency`,`txn_status`,`txn_date`,`extra_data`,`service_provider`,`service_alias`,`item_id`,`item_type`,`sender_id`,`receiver_id`,`custom_price`,`order_status`,`transfer_type`,`bank`) VALUES ('现金币','50','EE2CE817052183C2','45','CNY','completed','2016-12-28 02:33:00','手续费:5','系统','','2','currency','50','47','0','transfer','2','0')
它不起作用如下:
INSERT INTO `#__vc_transactions` (`title`,`units`,`txn_id`,`txn_amount`,`txn_currency`,`txn_status`,`txn_date`,`extra_data`,`service_provider`,`service_alias`,`item_id`,`item_type`,`sender_id`,`receiver_id`,`custom_price`,`order_status`,`transfer_type`,`bank`) VALUES ('现金币','1','C5EAE30FBC59425F','1','CNY','pending','2016-12-28 02:34:35',NULL,'系统','','2','currency','0','50','0','transfer','1','1')
答案 0 :(得分:-2)
试试这个
INSERT INTO `#__vc_transactions` (`title`, `units`, ...) VALUES ('abc', '3', ...);