Has anyone used PDO?
If so what did you think?
What it is good for / not good for?
PDO Opinion?
Moderator: General Moderators
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
- dibyendrah
- Forum Contributor
- Posts: 491
- Joined: Wed Oct 19, 2005 5:14 am
- Location: Nepal
- Contact:
taken from http://omniti.com/
Code: Select all
try {
$db = new PDO($dsn, $user, $password);
} catch (PDOException $e) {
echo 'Connect failed:'. $e->getMessage();
}
$stmt = $db->prepare("select * from country where name like 'Aus%'");
$stmt->execute();
while ($row = $stmt->fetch())
print_r($row);- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US