Re: What am I doing wrong... I want to increment a number in a DB

2002-06-03 Thread Ovid
--- "FLAHERTY, JIM-CONT" <[EMAIL PROTECTED]> wrote: > foreach $row(@$array_ref) { > my($num,$title,$media,$serial,$time,$class,$remarks,$custody,$loc, > $format,$qty,$lab,$rew,$sta,$history5,$check) = @$rows; > > $history2 = $history5; > $history2++; > > } > $dbh2 =DBI ->connect($data_source,

Re: What am I doing wrong... I want to increment a number in a DB

2002-06-03 Thread Adam Morton
>> Some where it resets back to zero all the time You do "foreach $row", then you set all of your variables to pieces of "@$rows". Note the trailing 's'. Typo strikes again. All of those values are probably undefined, since I assume "$rows" is undefined, thus they get inserted as 0 or ''. Simp

Re: What am I doing wrong... I want to increment a number in a DB

2002-06-03 Thread ivan . drvaric
Hi, The question appears if your data is reset in database after transaction or during transaction. If after transaction is the case then you should take care on commit mechanism of transaction. Some database interfaces or databases can be set to so called auto-commit where commit is issued to d