Hello, I need some pseudo-unique numbers like invoice numbers. They start every year with 1, so autoincrement won't work. My idea was to use a helper table with just just two fields 'year' and 'last_used_number'. Is it enough to create a two column unique key or would it be better to do something along these lines: - lock table (or row?) - read last_used_number for the year - increment it - save - unlock
Is there an idiom for this kind of task? And how can I do it with RDBO? (I did a search for 'lock' in the docs and didn't find anything) Thanks, Michael ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object