>
>
> Hi
> below is a small sub I wrote. It works, but mixes up the updates for 
> several fields.
> The update query should take every value and update the assigned column.
> But every time it happens, that after the columns are omitted or added 
> so that the columns are not correctly updated.
>
> Help and hints will be greatly appreciated...
>
> Regards,
>
> Sven
>
>
>
>
> sub do_data {
>
>
>       my  $curl = param('curl');
>       my  $name = param('firstname');
>       my  $surname = param('surname');
>       my  $course = param('course');
>       my  $rank = param('rank');
>       my  $nation = param('nation');
>       my  $cname = param('organisation');
>       my  $caddress = param('caddress');
>       my  $ctel = param('ctel');
>       my  $cfax = param('cfax');
>       my  $cmobile = param('cmobile');
>       my  $cemail = param('cemail');
>       my  $btype = param('btype');
>       my  $quali = param('quali');
>       my  $experi = param('experi');
>       my  $inhouse = param('inhouse');
>       my  $resid = param('residence');
>       my  $ptel = param('ptel');
>       my  $pfax = param('pfax');
>       my  $pmobile = param('pmobile');
>       my  $pemail = param('pemail');
>       my  $birthday = param('birthday');
>       my  $marital = param('marital');
>       my  $hobbies = param('hobbies');
>       my  $membership = param('membership');
>       my  $pcont = param('pcont');
>       my  $hq = param('hq');
>
>
> #  chomp (
> #             $surname,  $firstname, $name,  $course,  $nation,  $rank,  $cname,
> #             $caddress, $ctel, $cfax, $cmobile, $cemail, $btype,  $quali,  
> $experi,
> #             $inhouse, $resid, $ptel, $pfax, $pmobile, $pemail, $birthday, 
> $marital,
> #             $hobbies, $membership, $pcont, $hq
> #             );
>
>
>       my $dbc = DBI->connect( $dsn, $db_user, $db_pass ) or die "cannot 
> connect to server: $DBI::errstr\n" ;
>
>       my $update = $dbc->do(
>               "update memberscopy
>               set course='$course', nation='$nation', rank='$rank', cname='$cname',
>               caddress='$caddress', ctel='$ctel', cfax='$cfax', 
> cmobile='$cmobile', cemail='$cemail',
>               btype='$btype', quali='$quali', experi='$experi', 
> inhouse='$inhouse', resid='$resid', ptel='$ptel',
>               pfax='$pfax', pmobile='$pmobile', pemail='$pemail', 
> birthday='$birthday', marital='$marital',
>               hobbies='$hobbies', membership='$membership', 
> pcont='$pcont',  hq='$hq', curl='$curl'
>               where name = '$name' and surname = '$surname'  "
>                                               ) or die "can not do it 
>$DBI::errstr\n";
>
>
>       &thx;
>       
>
>       exit;
> }
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to