Subject | Re: [firebird-php] Inserting NULLs as parameter |
---|---|
Author | Jochem Maas |
Post date | 2008-04-14T10:27:59Z |
Jiri Cincura schreef:
is not NULLABLE, ergo you can't pass in NULL for the id value.
> On 4/13/08, Jochem Maas <jochem@...> wrote:and firebird doesn't give a hoot about your trigger. the id field
>> the field doesn't allow a NULL, that's why you get the error.
>> one way to tackle this is use an insert trigger that sets
>> the new.id (from the relevant generator) when the given insert id
>> is not set ... and change your query to:
>
> I have a before insert trigger.
is not NULLABLE, ergo you can't pass in NULL for the id value.
>no it wont, you get an error on insert remember.
>> update or insert into polls (question, visible) values (?, ?) returning new.id
>
> But this isn't same as mine. This will do insert every time.
>