6 Sep 2002 22:01
Auto-increment problem
Roman <at> Melihhov <roman <at> blakout.net>
2002-09-06 20:01:53 GMT
2002-09-06 20:01:53 GMT
I have table defined as:
CREATE TABLE messages (
_rowid TIMESTAMP(14) NOT NULL,
msg_mode enum('p','a') default NULL,
acct INT(10) UNSIGNED NOT NULL DEFAULT 1,
threadID INT(5) UNSIGNED NOT NULL AUTO_INCREMENT,
re_threadID INT(5) UNSIGNED DEFAULT NULL,
k_0 TINYTEXT,
k_1 TINYTEXT,
k_2 TINYTEXT,
k_3 TINYTEXT,
k_4 TINYTEXT,
k_5 TINYTEXT,
k_6 TINYTEXT,
k_7 TINYTEXT,
k_8 TINYTEXT,
k_9 TINYTEXT,
comment_remote TINYTEXT,
comment_author TINYTEXT,
comment_headline TINYTEXT,
comment_body TEXT,
PRIMARY KEY (_rowid, acct, threadID)
) TYPE=MyISAM
$sth = $dbh ->prepare("INSERT INTO $m_table VALUES (NOW(), ... $ acct, 'mysql_insert_id()'
does not increment threadID value, it's just 1 (in every row added). What gives. Ideas appreciated.
Romaneth.
(Continue reading)
RSS Feed