author | Dan Fuhry <dan@enanocms.org> |
Sat, 23 Feb 2013 14:26:05 -0500 | |
changeset 8 | f68fdcc18df9 |
permissions | -rw-r--r-- |
<?php global $db; function db_setup() { global $db, $mysql; $db = new PDO("mysql:host={$mysql['host']};user={$mysql['user']};{$mysql['password']};dbname={$mysql['dbname']}"); } function db_prepare($sql) { global $db; $st = $db->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY)); return $st; } db_setup();