 |
|
ผมลองecho sql ออกดู แล้วลองไป คิวรี ดูใน mysql
มันขึ้น error แบบนี้ Duplicate entry '39' for key 'PRIMARY' แก้ไงครับ
อันนี้เป็น table
Code (SQL)
CREATE TABLE IF NOT EXISTS `wss_webboard_answer` (
`question_id` int(4) NOT NULL DEFAULT '0',
`a_uid` int(11) NOT NULL DEFAULT '0',
`a_id` int(4) NOT NULL DEFAULT '0',
`a_name` varchar(65) NOT NULL DEFAULT '',
`a_email` varchar(65) NOT NULL DEFAULT '',
`a_topic` varchar(255) DEFAULT NULL,
`a_answer` longtext NOT NULL,
`a_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`a_form_ts` int(11) NOT NULL DEFAULT '0',
`ip_answer` varchar(32) NOT NULL,
KEY `a_id` (`a_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
อันนี้เป็น คิวรี่ที่ echo ออกมาดู
insert into wss_webboard_answer set question_id = '39', a_id = '2', a_name = 'usertest', a_email = '[email protected]', a_answer = '
test post
', a_topic = 'test', a_datetime = now(), a_uid = '444', a_form_ts = '1362471106', ip_answer = 'xx.xx.xx.xx';
Tag : PHP, MySQL, HTML/CSS
|
|
 |
 |
 |
 |
Date :
2013-03-05 15:31:02 |
By :
ninjadark |
View :
6404 |
Reply :
3 |
|
 |
 |
 |
 |
|
|
|
 |