update database

update database

update database
我想把这么一个结果写入数据库
5 records with 4 features has been loaded
data point 0 is in cluster 0
data point 1 is in cluster 0
data point 2 is in cluster 0
data point 3 is in cluster 0
data point 4 is in cluster 0
代码如下:
open(FILE,"C:\\temp\\result.txt");
while($line = <FILE>)
{
$line =~ s/^Runing.*\n$//g;
$line =~ s/\n/<br>/g;
print ($line);
my $dbh = DBI->connect("DBI:mysql:database=newuser;host=localhost", "root", "", {'RaiseError' => 1});
# execute INSERT query
my $result = $dbh->do("update user set result = '$line' where id = '$id'");

};
close FILE;
但是当我去数据库查看时却看到这样的结果:(result类型是varchar 254)
data point 4 is in cluster 0
为什么会只写入这么一点东西呢?
update database
是我说错了,呵呵,谢谢。
但是按你说的改完还是不行啊




   

请先检测你的SQL语言.
update table1 set field1.
update table1 set field1=value1 where 范围
这样应该没错啊