Hi all,
I have the following question.
I have the following update
my $sql = 'UPDATE KUKU
SET
A = ?,
B = ?,
C = ?,
D = ?
';
I have a function where i get a part of the values.
If one of the values was not given then i want to reset the value.
For example if A was 'david' and i fon't get a value for david i want
to reset it.
There are also fields which are not nullable, so i can not push nulls
where no values are given.
I read that there is a mysql keyword default.
so i make something like this.
@values = map{$args{$_} //'DEFAULT'}keys %args
It works except for varchar.
then i end with having written DEFAULT in the column.
Is there any way around it ?
Thanks,
David