blob: c1bb2b51147c7daa9dfe90def1ca7fcfa6a36558 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php # vim:ft=php
require_once('pdo.inc');
set_sql('create', 'CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10))');
set_sql('insert1', 'INSERT INTO test VALUES(1, \'A\')');
set_sql('insert2', 'INSERT INTO test VALUES(2, \'B\')');
set_sql('insert3', 'INSERT INTO test VALUES(3, \'C\')');
set_sql('select', 'SELECT * FROM test');
$DB->exec($SQL['create']);
$DB->exec($SQL['insert1']);
$DB->exec($SQL['insert2']);
$DB->exec($SQL['insert3']);
$stmt = $DB->query($SQL['select']);
var_dump($stmt->fetchAll(PDO_FETCH_NUM));
?>
|