I recently created a sort of check drafting system in cold fusion.. but that's not important, what is important is the check numbers.
When you get a new account from the bank, they ask you what check # to start out at.. Nobody wants to start at 1.. Businesses distrust low-numbered checks.
I had the same feeling about my check drafting system, after all the numbers are only for your identification purposes anyway.. they're not anything super special.
Well there is of course just adding to the number in the output..
#Evaluate(chknum + 9300)#.. Now that's always nice but for consistency I'd have to do it everywhere, and then if osmeone entered a check number, I'd have to subtract the added amount.
Well.. Check numbers should be unique and of course databases have primary keys which are also instended (and thoroughly enforced) to be unique. So that's what I used.. But I didn't want to start at 1.. and I didn't want to have thousands of "fake" rows..
But I found out (this works in sql server at least) that if you setup another primary key on your table and change the original to regular int/numeric/number whatever, and then for your first row put in the desired starting number, and then go back and delete the new key and restore the properties to the old one.. That that's where the number starts.
This isn't a big tip.. Its not going to make or break a website, but it saved me a lot of time.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.