Created
November 10, 2015 09:39
-
-
Save samm-git/98591bd52bd7c568a692 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
for(;;){ | |
usleep(20000); // 20 ms | |
$db = new PDO('mysql:host=slave;dbname=Magento;charset=utf8', 'dev_user1', 'XXXXXX', array(PDO::ATTR_EMULATE_PREPARES => false, | |
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); | |
try { | |
//connect as appropriate as above | |
$db->query('SET NAMES utf8'); | |
} catch(PDOException $ex) { | |
echo "An Error occured:"; | |
echo $ex->getMessage()."\n\n"; | |
} | |
$db = null; // close conn | |
// echo "."; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment