Skip to content

Instantly share code, notes, and snippets.

@mente
Created October 4, 2011 09:23
Show Gist options
  • Save mente/1261223 to your computer and use it in GitHub Desktop.
Save mente/1261223 to your computer and use it in GitHub Desktop.
<?php
$pdo = new PDO('mysql:host=127.0.0.1;dbname=baikal', 'root', '');
$stmt = $pdo->query('SELECT created_date FROM carts_articles');
if (!$stmt->execute()) {
die("Unable to complete statement");
}
foreach ($stmt->fetchAll() as $row) {
var_dump($row[0]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment