On 30 Jan 2006 at 19:35, Ron Savage wrote: > > - how can I use 0-values (not NULL!) as primary key? When I try to > > add a record with the primary key = 0 a record is created with the > > next increment of the primary key. That looks like a bug to me > > (check on truth instead of definedness somewhere). I would like to > > use the 0- record as default (the other records in these tables are > > just copies of the default with some minor adjustments). > > What makes you think this is a Perl-level problem? > > You did not name your database server, but that's where I'd look first.
It is SQLite but on that level everything works just fine: sqlite> create table test ( ...> nr INTEGER NOT NULL PRIMARY KEY, ...> name VARCHAR ...> ); sqlite> insert into test VALUES (0, 'Name'); sqlite> select * from test; 0|Name sqlite> So I think this is a bug in Class::DBI. Michael --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[email protected]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
