insert into statement problem
From: Kaustubh Shinde (shindekaustubh_at_hotmail.com)
Date: 07/30/04
- Next message: Jay Harris: "Help with DB2 DBI Connection"
- Previous message: Glen Avery: "make test problem when installing DBI perl package"
- Next in thread: Mark Nettlingham: "RE: insert into statement problem"
- Maybe reply: Mark Nettlingham: "RE: insert into statement problem"
- Maybe reply: Timothy Helck: "RE: insert into statement problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: dbi-users@perl.org Date: Fri, 30 Jul 2004 08:35:13 +0000
Hi,
I have been trying to read data from a hash and put it into myaql using
insert into statement.
foreach $key (keys %submt_feat)
{
if($submt_feat{$key}){
$submt_feat{$key}= $submt_feat{$key};
push(@sbft,$key);
push(@sbval,$submt_feat{$key});
}
}
$temfeat = "(".join(",",@sbft).")";
$temval = "(".join(",",@sbval ).")";
$ins = "insert into submitter ";
$statement = $ins.$temfeat." values ".$temval.";";
$statement = $dbh->prepare($statement);
$statement->execute();
but it doesnt work because the values need quotes around them since its
varchar type.
i am not able to get quotes around them. This is very urgent and I will
really really appreciate any ideas.
Thank you,
Kaustubh
_________________________________________________________________
Studies, career, romance. Whatever your concerns.
http://www.astroyogi.com/newMSN/ We have the answers.
- Next message: Jay Harris: "Help with DB2 DBI Connection"
- Previous message: Glen Avery: "make test problem when installing DBI perl package"
- Next in thread: Mark Nettlingham: "RE: insert into statement problem"
- Maybe reply: Mark Nettlingham: "RE: insert into statement problem"
- Maybe reply: Timothy Helck: "RE: insert into statement problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|