from http://www.php.net/manual/en/class.pdo.php
###### config.ini ######
db_driver=mysql
db_user=root
db_password=924892xp
[dsn]
host=localhost
port=3306
dbname
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
} catch(PDOException $error) {
echo $error->getMessage();
}
}
}
public static function getInstance() {
if(empty(self::$instance)) {
try {
new DB();
//var_dump(self::$instance);
} catch(PDOException $error) {
echo $error->getMessage();
}
}
//var_dump(self::$instance);
return self::$instance;
}
private function __clone() {
// Stopping Clonning of Object
}
private function __wakeup() {
// Stopping unserialize of object
}
}
?>
prepare($sqlExample);
$stm->execute();
$result = $stm->fetchAll(PDO::FETCH_ASSOC);
var_dump($db);
var_dump($db1);
echo "";
print_r($result);
echo "
";
} catch (Exception $e) {
print $e->getMessage();
}
?>