search for: jobseq

Displaying 1 result from an estimated 1 matches for "jobseq".

2006 Jul 19
2
Creating a safe sequence generator
...he highest for the given account, and unique as well. The rails way is to create one numeric key for the whole table, and then use a specifically named column for the foreign key: create table jobs ( id int(10) unsigned not null auto_increment account_id int(10) unsigned not null default 0, jobseq int(10) unsigned not null, # not assigned by mysql :( ... other fields ... primary key (id) ); Which is workable, but now the job numbers aren''t specific to the customer, as I would like them to be. In fact, in this model, they are not supplied or managed by the database at all. Is...