Auto-increment problem

Auto-increment problem

am 06.09.2002 22:01:53 von roman

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.



------------------------------------------------------------ ---------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail msql-mysql-modules-thread1908@lists.mysql.com

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail msql-mysql-modules-unsubscribe@lists.mysql.com instead.