[Koha-bugs] [Bug 10454] Duplicate card numbers may be generated

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Jun 22 12:58:05 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10454

--- Comment #5 from M. de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to comment #4)
> Others have suggested last_insert_id. Is last_insert_id a good option? The
> DBI page has scary things like: "Given all the caveats above, it's clear
> that this method must be used with care." And some of those are ugly caveats.

See bug 10478 and bug 9921.

> I was thinking of generating an ID made of 4 parts which should be unique
> enough:
> 1) 16 character random string (A-Za-z0-9 character options).
> 2) process id padded to 6 digits
> 3) microsecond time padded to 20 digits
> 4) CGISESSID (or a 32 character random string if undefined).

Use a random number generator from cpan?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list