elsif ( $action eq 'Update' ) { # update the event my @bind = ( $q->param( 'title' ) || '', $q->param( 'description' ) || '', $q->param( 'eventdate' ) || '', $q->param( 'persistent' ) || '0', # $id, ); # Hmmm, there appears to be a bug in here somewhere... # my $sth = $dbh->prepare( "UPDATE tblEvents SET title=?,description=?,eventdate=?,persistent=? where id=?" ) my $sth = $dbh->prepare( "UPDATE tblEvents SET title=?,description=?,eventdate=?,persistent=? where id=$id" ) or die "Cannot prepare: " . $dbh->errstr(); $sth->execute(@bind) or die "Cannot execute: " . $sth->errstr(); }