perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <rich...@ecos.de>
Subject Re: DBIx Update
Date Mon, 02 Sep 2002 09:24:04 GMT
> table. Now, the problem is, that when some variables are undefined in this
> %hash, but they exist in table, then Update sets them to 'undef' in table
> too and I don't like it.
> 

Just delet them from the data hash:

foreach (keys %$data)
    {
    delete $data -> {$_} if (!defined ($data -> {$_})) ;
    }

> 
>    $db->Update( $data, $where );
> 

then they won't get set to NULL in the database

Gerald



-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message