PDO::ATTR_TIMEOUT script specific?

From: Date: Thu, 02 Aug 2007 18:49:44 +0000
Subject: PDO::ATTR_TIMEOUT script specific?
Groups: php.general 
Request: Send a blank email to php-general+get-260084@lists.php.net to get a copy of this message
Hi I have a script that needs to get ad information from two different sources, a primary and fallback. The primary source is a high traffic (and poorly designed/unpartitioned MSSQL database) with millions of records that gets locked up when 'certain folks' (ie executives) perform large queries. What I'd like to be able to do is set a timeout for a query to this database of 5 to 10 seconds and branch to the fallback database if the timeout expires. I can't just use the fallback as my primary as it doesn't always have the most up to date info. It's really only for placeholder queries until the primary frees up. So the question is, does setting PDO::ATTR_TIMEOUT affect all scripts or just the one that set the variable? Thanks in advance Ken

« previous php.general (#260084) next »