S
Samik R.
Hello,
I have been using perl for quite sometime now, but something got me
stumped. I am trying to use the following code:
--------------------
foreach (@SPointIDs)
{
my $RefID="";
foreach $RefID (@RefineryIDs)
{
$DBHandle->execQueryNoResult("insert into orders
values('$GameID',$CurrentWeek,'$RefID','$_',1000,'Road')");
}
}
------------------
The execQueryNoResult method is expecting a string as it's argument.
When I run this, and print from inside the execQueryNoResult method, the
insert statement comes as follows:
insert into orders
values('D00000',1,'ARRAY(0x1035d5b8)','ARRAY(0x1035d678)',1000,'Road')
But, if I use a for loop rather than a foreach loop, and then access the
elements as $SPointID[$i] etc., then things are fine.
What am I missing here? Is there something wrong in my syntax?
Thanks for any pointers.
-Samik
I have been using perl for quite sometime now, but something got me
stumped. I am trying to use the following code:
--------------------
foreach (@SPointIDs)
{
my $RefID="";
foreach $RefID (@RefineryIDs)
{
$DBHandle->execQueryNoResult("insert into orders
values('$GameID',$CurrentWeek,'$RefID','$_',1000,'Road')");
}
}
------------------
The execQueryNoResult method is expecting a string as it's argument.
When I run this, and print from inside the execQueryNoResult method, the
insert statement comes as follows:
insert into orders
values('D00000',1,'ARRAY(0x1035d5b8)','ARRAY(0x1035d678)',1000,'Road')
But, if I use a for loop rather than a foreach loop, and then access the
elements as $SPointID[$i] etc., then things are fine.
What am I missing here? Is there something wrong in my syntax?
Thanks for any pointers.
-Samik