search for: reogranized

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

2006 Sep 30
6
generating unique tracking numbers
...permanent unique numbers for tracking objects such as packing slips, inventory items, customers, employees, etc. It''s tempting to use the autogenerated id, but they''re not pretty enough for human consumption and it can be problematic having assigned ids if tables ever need to be reogranized. I think it would be preferrable to use a sequence, but haven''t found a way of doing this with MySQL, so I just increment the max value of the id column. Here''s how I generate a customer number: application.rb: CUSTOMER_BASE = "10000" def next_id(table_name, colum...