[PHP] Re: Multiple Threads?

2002-04-14 Thread Richard Creech

Hello All,
IF you are using mySQL database then the php manual indicates you can run multiple 
connections. Presumably you could execute several web queries at the same time, each 
with its own connection. I haven't tried such, but the manual suggests it is possible:

http://www.php.net/manual/en/function.mysql-connect.php

If a second call is made to mysql_connect() with the same arguments, no new link will 
be established, but instead, the link identifier of the already opened link will be 
returned. The new_link parameter modifies this behavior and makes mysql_connect() 
always open a new link, even if mysql_connect() was called before with the same 
parameters. 
Note: The new_link parameter became available in PHP 4.2.0 
 


Kind Regards,

Richard Creech
[EMAIL PROTECTED]
250.744.3350 Pacific Time Canada
Dreamriver Software Powers the Net
http://www.dreamriver.com

Matthew Walker [EMAIL PROTECTED] wrote:

I don’t remember the name of the module offhand, but once upon a time, I
used a perl module that would fork multiple threads so that you could
execute several web queries at the same time. This saved a lot of time,
if, for instance, you had to get information from UPS, FedEx, and the
USPS about shipping rates to display on a page. If you had to query them
one at a time, the delay would be unacceptable. However, with that perl
module, you could query them all at the same time, making it much
faster.
 
Does anyone know if such a thing exists for PHP?
 
Matthew Walker
Senior Software Engineer
ePliant Marketing
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: Multiple Threads?

2002-04-14 Thread Matthew Walker

Won't work for web connections, because it waits for each connection to
complete before running the next one.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Richard Creech [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, April 14, 2002 1:46 PM
To: [EMAIL PROTECTED]
Cc: Matthew Walker
Subject: Re: Multiple Threads?

Hello All,
IF you are using mySQL database then the php manual indicates you can
run multiple connections. Presumably you could execute several web
queries at the same time, each with its own connection. I haven't tried
such, but the manual suggests it is possible:

http://www.php.net/manual/en/function.mysql-connect.php

If a second call is made to mysql_connect() with the same arguments, no
new link will be established, but instead, the link identifier of the
already opened link will be returned. The new_link parameter modifies
this behavior and makes mysql_connect() always open a new link, even if
mysql_connect() was called before with the same parameters. 
Note: The new_link parameter became available in PHP 4.2.0 
 


Kind Regards,

Richard Creech
[EMAIL PROTECTED]
250.744.3350 Pacific Time Canada
Dreamriver Software Powers the Net
http://www.dreamriver.com

Matthew Walker [EMAIL PROTECTED] wrote:

I don’t remember the name of the module offhand, but once upon a time, I
used a perl module that would fork multiple threads so that you could
execute several web queries at the same time. This saved a lot of time,
if, for instance, you had to get information from UPS, FedEx, and the
USPS about shipping rates to display on a page. If you had to query them
one at a time, the delay would be unacceptable. However, with that perl
module, you could query them all at the same time, making it much
faster.
 
Does anyone know if such a thing exists for PHP?
 
Matthew Walker
Senior Software Engineer
ePliant Marketing
 



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php