sql script will net

E

Enno Lenze

Huhu!
Wenn ich mein scirpt ausfuehre meldet der apache:

DBD::mysql::st execute failed: You have an error in your SQL syntax;\
check the manual that corresponds to your MySQL server version for \
the right syntax to use near 'in='2004-05-05',out='2004-10-06' where\
sn='AB0001'' at line 1 at (...)

sub edit_entry {
$dbh = DBI->connect($dsn, $user, $password);
$sth = $dbh->prepare("update $table SET \
sn=?,model=?,describtion=?,remarks=?,condition=?,in=?,out=? where \
sn=?");

$sth->execute($q{sn},$q{model},$q{describtion},$q{remarks},$q{condition},$q{in},$q{out},$q{sn});
$dbh->disconnect;
print "<h2><font color=\"green\">line addet/changed for \
$q{sn}</font></h2>\n";
$q{field}='sn';
$q{pattern}=$q{sn};
&search;
}

ich komme aber net drauf wo der fehler leigt.

gruss, enno
 
A

Arndt Jonasson

Enno Lenze said:
Wenn ich mein scirpt ausfuehre meldet der apache:

Dies ist eine englischsprachige Gruppe. Mehr Leute werden Deine Frage
verstehen, wenn Du sie auf english stellst.

(This is an English-speaking group. More people will understand your
question if you put in in English.)
$sth = $dbh->prepare("update $table SET \
sn=?,model=?,describtion=?,remarks=?,condition=?,in=?,out=? where \
sn=?");

Having newlines inside the string, which you have here, makes me
slightly suspicious, but maybe that is alright - I've never used SQL.
 
E

Enno Lenze

hi!
sorry this was supposed to eb posted in a german newsgroup, but i missed
the de..

Thanks for the help!

regards, enno
 

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top