Subject Re: [firebird-php] [info/tip] dynamically created generators (inside stored procedures).
Author Lester Caine
Jochem Maas wrote:

> in the mean time.... today I have spent most of my time trying to
> figure out how I can dynamically create GENERATORS (a process
> that is triggered on a successful insert of a certain table of my
> db). why would I want to do this? well I have a table that stores
> 'prizedraw' [marketing] actions that the client can add to (& edit)
> via a CMS - according to local law the [3] winning prizedraw numbers
> must be determined beforehand and the numbers deposited with a
> sollicitor - the upshot being that entrants must be handed out prizedraw
> numbers from a predefined range (in fact a start number is enough) and to avoid
> any kind of race condition when handing out prizedraw numbers from
> the predefined range I chose to use firebird GENERATORs (why re-invent the wheel
> right).

How about looking at how ADOdb does it then ?
bitweaver uses this to build the original database and add 'sequences'
as required :)

Lester Caine
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.