我有一个恶梦试图插入一些数据到表中。出于某种原因,它只会让我插入数字,而不是将文本插入到特定的行中,甚至不会插入任何单词。我已经尝试将行设置为不同的类型(文本,Varchar,Longtext),但没有任何理由可以让人高兴?我之前完成了这些工作,我完全陷入了为什么现在不工作。mysql插入文本问题
问题行是order_note和测试,这里的查询:
$table_name = $wpdb->prefix . "dpsc_transactions";
$query = "INSERT INTO {$table_name} (`invoice`, `date`, `order_time`, `billing_first_name`, `billing_last_name`, `billing_country`,
`billing_address`, `billing_city`, `billing_state`, `billing_zipcode`, `billing_email`, `phone`, `shipping_first_name`, `shipping_last_name`,
`shipping_country`, `shipping_address`, `shipping_city`, `shipping_state`, `shipping_zipcode`, `products`, `payment_option`, `discount`,
`tax`, `shipping`, `total`, `order_note`, `test`, `payment_status`) VALUES ('{$invoice}', NOW(), {$order_time}, '{$bfname}', '{$blname}', '{$bcountry}', '{$baddress}',
'{$bcity}', '{$bstate}', '{$bzip}', '{$bemail}', '{$phone}', '{$sfname}', '{$slname}', '{$scountry}', '{$saddress}', '{$scity}', '{$sstate}', '{$szip}',
'{$products}', '{$payment_option}', {$dpsc_discount_value}, {$tax}, {$dpsc_shipping_value}, {$dpsc_total}, {$order_note}, {$test}, 'Pending')";
$wpdb->query($query);
什么是mysql错误,你看到了吗? – Ish 2011-02-25 18:32:13
'row_id = woodoo'?粘贴错误。 – Nishant 2011-02-25 18:37:29