Thanks for all the answers
But I should have ask it differently,
and I will put in a piece of code
in order to be more specific.
I have this code:
#!/usr/local/bin/perl
use DBI;
use strict;
my $field;
my $temp;
my $i;
my $query;
my $name;
my $value;
my $glossary_id;
my $inbuf;
my %Form;
my $pair;
read(STDIN,$inbuf,$ENV{'CONTENT_LENGTH'});
my @pairs = split(/&/,$inbuf);
foreach $pair (@pairs) {
($name,$value)=split(/=/,$pair);
$value=~tr/+/ /;
$value=~s/%(
a-fA-F0-9a-fA-F0-9)/pack("C", hex($1))/eg;
$Form{$name}=$value;
}
$ENV{INFORMIXSERVER} = "develop_remote";
my $database = "test";
my $dbh = DBI->connect("dbi:Informix:$database");
if ($Form{field}=~/editor_comment/){
$query = "update glossary_develop set($Form{field}) = (\"$Form{value}\") where glossary_id=$Form{glossary_id}";
}
else {
$query = "update glossary_develop set($Form{field}) = ($Form{value}) where glossary_id=$Form{glossary_id}";
}
my $rows_affected = $dbh->do($query);
and the query is no good if it breakes in to few
line in the middle of the value: ($Form{value})
Hope I am more specific now and hope you can help me
again.
Thanks.
Tsvika.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.