wordpress数据库查询插入错误

5fjcxozz  于 2021-06-24  发布在  Mysql
关注(0)|答案(0)|浏览(199)

我运行的是wordpress4.9.6,我使用的是mysql数据库,并创建了一个通过cron作业数据拉入的插件。在我的开发环境中,一切看起来都很好,但当我将其部署到生产环境中时,会出现以下错误:
查询插入到的wordpress数据库错误 wp_Market_api ( coin , id_Market , tag , algorithm , block_time , block_reward , block_reward24 , last_block , difficulty , difficulty24 , nethash , exchange_rate , exchange_rate24 , exchange_rate_vol , exchange_rate_curr , market_cap , estimated_rewards , estimated_rewards24 , btc_revenue , btc_revenue24 , profitability , profitability24 , lagging , timestamp , created_at , updated_at )值('verge-lyra2rev2','217','xvg','lyra2rev2','150','730','730','2294046','17609.20111029','13045.604429967','504206285849','3.86e-6','3.8173765867419e-6','378.72320717','btc','364405665.20','11.03276','14.89208','0.00004259','0.00005748','9','13','2018-06-25 18:39:22','2018-06-25 18:40:02',','2018-06-25 18:40:02')由do\u action\u ref\u array制作,wp\u hook->do\u action,wp\u hook->apply\u filters,call\u user\u func\u array,marketapi->updatemarketapi
我正在创建一个结果对象 $res 我把它放在数据库里:

$wpdb->insert("{$wpdb->prefix}market_api", $res);

有什么建议我的问题吗?除了我的 php_error.log ,我没有任何进一步的输出。
另外,当我手动运行查询时,它会正确地插入到数据库中。
感谢您的回复!
更新
在表的结构下查找:

CREATE TABLE `wp_Market_api` (
 `id` bigint(20) NOT NULL AUTO_INCREMENT,
 `coin` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
 `id_Market` bigint(20) NOT NULL,
 `tag` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
 `algorithm` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
 `block_time` decimal(15,6) NOT NULL,
 `block_reward` decimal(15,6) NOT NULL,
 `block_reward24` decimal(25,18) NOT NULL,
 `last_block` decimal(20,3) NOT NULL,
 `difficulty` decimal(25,5) NOT NULL,
 `difficulty24` decimal(25,5) NOT NULL,
 `nethash` decimal(25,5) NOT NULL,
 `exchange_rate` decimal(20,11) NOT NULL,
 `exchange_rate24` decimal(25,22) NOT NULL,
 `exchange_rate_vol` decimal(27,18) NOT NULL,
 `exchange_rate_curr` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
 `market_cap` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
 `estimated_rewards` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
 `estimated_rewards24` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
 `btc_revenue` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
 `btc_revenue24` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
 `profitability` decimal(10,0) NOT NULL,
 `profitability24` decimal(10,0) NOT NULL,
 `lagging` tinyint(1) DEFAULT NULL,
 `timestamp` datetime NOT NULL,
 `created_at` datetime DEFAULT NULL,
 `updated_at` datetime DEFAULT NULL,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=163 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题