[thelist] make mysql accept 0 (zero) as a primary key value
Sarah Sweeney
mr.sanders at designshift.com
Fri Dec 10 07:49:38 CST 2004
> ususally when a default option is needed, i try to use -1 as the value.
> it tends to go over smoother and avoid the problems you are hitting
> right now.
This would work, except that I have the 0 hard-coded in various places
and it appears as a foreign key in several other tables. (But thanks,
Brian!)
More info, in case it helps: if I open the dump file and move the insert
statement that adds the row for AgencyID = 0 after the insert statement
that adds the row for AgencyID = 1, it works fine.
Unfortunately, the database is huge, so making this simple change to the
dump file every time I copy the database is a major pain - it's hard to
find an editor that will happily open a 264MB text file :) For now, I've
settled with running the dump on all tables but the troublesome one, but
it would be a lot easier if I didn't have to do that.
--
Sarah Sweeney :: Web Developer & Programmer
Portfolio :: http://sarah.designshift.com
Blog :: http://hardedge.ca
More information about the thelist
mailing list