Re: retrieve many values

2005-02-22 Thread mail-lists
Jones Robert Civ TTMS Keesler [JRC], on Tuesday, February 22, 2005 at 07:18 (-0600) typed: JRC> Use and toss ... Use and toss. JRC> While ( (@data) = $query->fetchrow_array) no, I can't use it, when i call execute() it will fill all my memory. also $dbh->selectrow_array doesn't work...(

Re: retrieve many values

2005-02-22 Thread mail-lists
Ing. Branislav Gerzo [IBG], on Tuesday, February 22, 2005 at 13:06 (+0100) wrote these comments: IBG> but it is good way ? It will not consume memory ? I'll try to be more exact: when I run this code: my $sth = $dbh->prepare_cached("select id, name from table"); my $sth = $dbh->$sth->execute();

Re: retrieve many values

2005-02-22 Thread Ing. Branislav Gerzo
Scott T. Hildreth [STH], on Tuesday, February 22, 2005 at 08:50 (-0600) typed the following: STH> my $sth = $dbh->prepare("QUERY"); STH> $sth->{"mysql_use_result"} = 1; this is indeed nice, but solve problem only half. When I "process" value I want insert/update it to db. But I

Re: retrieve many values

2005-02-22 Thread Ing. Branislav Gerzo
Scott T. Hildreth [STH], on Tuesday, February 22, 2005 at 08:50 (-0600) wrote the following: STH> my $sth = $dbh->prepare("QUERY"); STH> $sth->{"mysql_use_result"} = 1; thanks a lot, you save me a day! :) -- ...m8s, cu l8r, Brano. [Foiling felons and thwarting thieves. - Da

Re: retrieve many values

2005-02-22 Thread Ing. Branislav Gerzo
Scott T. Hildreth [STH], on Tuesday, February 22, 2005 at 08:36 (-0600) thinks about: STH> Mysql will return all rows by default, you need to turn that off. STH> I can't remember what the attribute is, read the DBD::mysql perldoc. I do everything, but I cannot find that. I looked in http://search

Re: retrieve many values

2005-02-22 Thread Scott T. Hildreth
I found it, Note, that most attributes are valid only after a successfull execute. An "undef" value will returned in that case. The most important excep- tion is the "mysql_use_result" attribute: This forces the driver to use mysql_use_result rather than mysql_store_res

Re: retrieve many values

2005-02-22 Thread Scott T. Hildreth
Mysql will return all rows by default, you need to turn that off. I can't remember what the attribute is, read the DBD::mysql perldoc. On Tue, 2005-02-22 at 15:22 +0100, Ing. Branislav Gerzo wrote: > Reidy, Ron [RR], on Tuesday, February 22, 2005 at 06:58 (-0700) wrote: > > my $sth = $dbh->>prepa

Re: retrieve many values

2005-02-22 Thread Ing. Branislav Gerzo
Reidy, Ron [RR], on Tuesday, February 22, 2005 at 06:58 (-0700) wrote: my $sth = $dbh->>prepare_cached("select id, name from table"); my $sth = $dbh->>$sth->execute(); RR> [rr] This should read $sth->execute. Execute retruns a RR> value, not a statement handle ($sth). yes, sorry for that. In my

RE: retrieve many values

2005-02-22 Thread Reidy, Ron
Your code looks very suspect, see below. -- Ron Reidy Lead DBA Array BioPharma, Inc. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tue 2/22/2005 6:31 AM To: DBI-Users Cc: Subject:Re: retrieve many values Ing. Branislav Gerzo [IBG], on

RE: retrieve many values

2005-02-22 Thread Jones Robert Civ TTMS Keesler
I think we need to see more information to understand why this is happening. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 22, 2005 7:32 AM > To: DBI-Users > Subject: Re: retrieve many values > > > I

Re: retrieve many values

2005-02-22 Thread 2ge
Ing. Branislav Gerzo [IBG], on Tuesday, February 22, 2005 at 13:06 (+0100) wrote these comments: IBG> but it is good way ? It will not consume memory ? I'll try to be more exact: when I run this code: my $sth = $dbh->prepare_cached("select id, name from table"); my $sth = $dbh->$sth->execute();

Re: retrieve many values

2005-02-22 Thread 2ge
Jones Robert Civ TTMS Keesler [JRC], on Tuesday, February 22, 2005 at 07:18 (-0600) typed: JRC> Use and toss ... Use and toss. JRC> While ( (@data) = $query->fetchrow_array) no, I can't use it, when i call execute() it will fill all my memory. also $dbh->selectrow_array doesn't work...(

RE: retrieve many values

2005-02-22 Thread Jones Robert Civ TTMS Keesler
] > Sent: Tuesday, February 22, 2005 6:07 AM > To: dbi-users@perl.org > Subject: retrieve many values > > > Hi all, > > I have table which consist of cca 20.000.000 rows, using MySQL. > How to do something with each row ? I mean: I can't select them > all into memo

retrieve many values

2005-02-22 Thread Ing. Branislav Gerzo
Hi all, I have table which consist of cca 20.000.000 rows, using MySQL. How to do something with each row ? I mean: I can't select them all into memory, I can't use LIMIT, because it is slow at higher values, so what is good to use ? I think about: select id, name from table where id > 100 and a