我有一个问题,我不能用逗号分隔数组,如果我放入内爆,它只显示数据库中的第一个数字,而不是第二个数字,我需要在数据库500756中插入
global $wpdb; $arg=array(500,756); $var = implode(",", $arg); --> return in db 500 ->I can not separate by commas, num 500 is only show in db $var = implode($arg); --> if i put this instead of the other return in db shows 500756 $wpdb->insert(\'number\',array( \'num\' => $var, ));
CREATE TABLE `number` ( `id` int(255) NOT NULL, `num` varchar(255) NOT NULL, ) ENGINE=MyISAM DEFAULT CHARSET=latin1; ALTER TABLE `number` ADD PRIMARY KEY (`id`); ALTER TABLE `number` MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39;