Sterin, Ilya writes:
> Well that's called forking. Weather you implement yourself, or DBD's
> implement for you, you still must fork or spawn a thread in order to do
> anything while the processing in progress.
Actually you could do that if DBI (and the driver) supported
asynchronous calls...
Michael
> -----Original Message-----
> From: Giotto De Filippi
> To: Sterin, Ilya; '[EMAIL PROTECTED] '
> Sent: 8/9/01 8:22 AM
> Subject: RE: background sql queries
>
> No, I do not mean forking.
>
> I want my program to be single threaded. What I want would be somehting
> like:
>
> $qh = $dbh->prepare("blabla");
> $qh->execute;
>
> while (!$qh->is_ready)
> {
> print "SQL is busy processing your query, please wait...\n";
> }
>
> @results = $qh->fetchrow_array;
>
> thanx for your help
>
> At 08:16 AM 8/9/2001 -0600, Sterin, Ilya wrote:
> >You mean forking??? You can do anything in the background by creating
> >another process with fork(). You can also use Thread, though I don't
> know
> >how stable it is as of now.
> >
> >Also note that you will not achieve parallel processing unless you are
> on a
> >multi-processor system, but that's irrelevant to the simple task you
> are
> >trying to accomplish.
> >
> >Ilya
> >
> >-----Original Message-----
> >From: Giotto De Filippi
> >To: [EMAIL PROTECTED]
> >Sent: 8/9/01 7:43 AM
> >Subject: background sql queries
> >
> >(Sorry, may be a double post but I don't know if the other message went
> >throught as I was still not registered)
> >
> >Hello,
> >
> >Can I do SQL background queries with DBI?
> >
> >like instead of doing ->prepare, ->execute and ->fetchrow_hashref
> >something
> >like ->is_ready, to do before fetchrow, so for example I could do other
> >things with my perl program while it's waiting for the sql databsae to
> >return the result.
> >
> >Thanx much
> >
> >Giotto
> >
> >
> >
> >----------------------------------------------
> >Giotto De Filippi
> >Web Marketer / Programmer
> >E - Mail: [EMAIL PROTECTED]
> >ICQ: 17988776
> >----------------------------------------------
>
> ----------------------------------------------
> Giotto De Filippi
> Web Marketer / Programmer
> E - Mail: [EMAIL PROTECTED]
> ICQ: 17988776
> ----------------------------------------------
--
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
[EMAIL PROTECTED] - [EMAIL PROTECTED]
International Sybase User Group - http://www.isug.com