Subject Re: [firebird-php] Inserting NULLs as parameter
Author Jiri Cincura
On 4/14/08, Jochem Maas <jochem@...> wrote:
> ok, so the php firebird extension probably does it wrong - that sucks but there
> is little that can be done about it (unless you want and can hack the relevant source) ...

No thanks, I have my fun with .NET provider. :) I can live with this,
but the first discovery was weird for me.

> an alternative 'solution' might be to wrap the SQL up in a stored procedure
> and let it take care of figuring out whether it needs to generate an ID. this
> removes the requirement of the -999 hack and also hides the workaround in the database
> (I find such workarounds less painful when I don't have to encounter them in my code
> on a daily basis ;-)

This was my old-school solution before update or insert statement came
up. The new feature saved me sometimes some writing but for PHP, I'll
probably switch to old style.

> ... when the submit happens one assumes that an update will occur, but instead
> an insert occurs and the item that was deleted no exists again ... is this desired?

Well, from architecture POV it's not desired. But this is small
trivial app. with much more reads than writes (and writes are only
from admins), that I simply don't care about this case ... :)

Jiri {x2} Cincura (CTO |