This may be totally unrelated, but I had a friend email me about the Vendor Perl
not working correctly on RH9.  I encouraged him to compile 5.8.1 or 5.8.2, I have
had nothing but trouble using the /usr/bin/perl that is shipped with RedHat.  One
of the biggest my complaints is that LARGEFILE_SOURCE is not compiled in (Although,
to be fair, I have not checked RH9).  On a new server, I always compile our own version
of perl and make sure that the developers use /usr/local/bin/perl in there code.  Just
thought I would mention it, since my friend was experencing quirkiness with the RH9 
compiled
perl as well.

                                STH

On 08-Jan-2004 Mike Blezien wrote:
> Server Info:
> 
> DBI:  1.39
> DBD::mysql:  2.9003
> MySQL Version: - 4.0.15-standard
> Perl ver.:  5.8.0
> RedHat/Linux 9.0
> 
> thx's
> -- 
> Mike<mickalo>Blezien
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Thunder Rain Internet Publishing
> Providing Internet Solutions that work!
> http://www.thunder-rain.com
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 
> 
> Keith Jackson wrote:
>> What version of DBD/DBI are you using and on what platform?  The exact
>> same thing happened to me on SunOS (don't remember the exact DBD/DBI
>> version).  I upgraded to the lastest DBD/DBI and the problem went away.
>> 
>> 
>> HTH,
>> 
>> Keith
>> 
>> On Thu, 2004-01-08 at 11:40, Mike Blezien wrote:
>> 
>>>Hello all,
>>>
>>>this one has been driving me nuts!! Below is a snip of code within a eval { } 
>>>for transactions.
>>>
>>>Everything gets inserted correctly but for some reason the $ary_ref->[$i] values 
>>>are always '0', they should be the `signupid` values from the `subscriptions` 
>>>table.
>>>
>>>In the 1st INSERT statement the auto_increment values (signupid) are created 
>>>correctly(in this code, 2 values, IE. 12,13) but when I go to retrieve these two 
>>>values in the SELECT statement, it always returns '0', $ary_ref->[$i]. The 
>>>@sitedata array has 2 lines of data(the $totalsubs equals '2' also) , and 
>>>everything is inserted correctly from the @insertdata into the INSERT statement 
>>>into the `site_subscriptions` table.
>>>
>>>No errors are generated within the eval {} and once the transaction is commited, 
>>>all goes exactly as it should, but for the life of me,... I can't figure out why 
>>>the $ary_ref->[$i] keeps inserting a '0' value?? Any help, ... suggestions would 
>>>be appreciated. :)
>>>
>>>#################################################################################
>>>$sql = qq|INSERT INTO subscriptions (signupid,siteid) VALUES (NULL,?)|;
>>>    for (1..$totalsubs) { $dbh->do($sql,undef,$siteid); }
>>>
>>>my $subsql  = qq|SELECT signupid FROM subscriptions WHERE siteid = $siteid|;
>>>my $ary_ref = $dbh->selectall_arrayref($subsql);
>>>my $sql = qq|INSERT INTO site_subscriptions $sitecols  VALUES $siteplaceholder|;
>>>
>>>        for (my $i; $i<@{$ary_ref}; $i++) {
>>>             chomp $sitedata[$i];
>>>           my @insertdata = split(/\|/,$sitedata[$i]);
>>>
>>>           # HERE THE $ary_ref->[$i] ALWAYS INSERTS '0' here
>>>           $dbh->do($sql,undef,$ary_ref->[$i],@insertdata);
>>>         }
>>>##################################################################################
>> 
> 
> 

-- 
----------------------------------
E-Mail: [EMAIL PROTECTED]
Date: 08-Jan-2004
Time: 12:18:16
----------------------------------

Reply via email to