Lines Matching refs:stmt
26 …$stmt = $db->prepare('INSERT INTO test(id, label1, label2) VALUES (1, :placeholder, :placeholder)'…
28 $stmt->execute(array(':placeholder' => 'row1'));
29 if ('00000' !== $stmt->errorCode())
31 var_export($stmt->errorCode(), true),
32 var_export($stmt->errorInfo(), true));
35 $stmt = $db->prepare('SELECT id, label1, label2 FROM test WHERE id = 1');
36 $stmt->execute();
37 var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
45 …$stmt = $db->prepare('INSERT INTO test(id, label1, label2) VALUES(2, :placeholder, :placeholder)');
47 $stmt->execute(array(':placeholder' => 'row2'));
48 if ('00000' !== $stmt->errorCode())
50 var_export($stmt->errorCode(), true),
51 var_export($stmt->errorInfo(), true));
54 $stmt = $db->prepare('SELECT id, label1, label2 FROM test WHERE id = 2');
55 $stmt->execute();
56 var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
67 $stmt = $db->prepare($sql);
68 $stmt->execute(array(':placeholder' => 1));
69 if ('00000' !== $stmt->errorCode())
71 var_export($stmt->errorCode(), true),
72 var_export($stmt->errorInfo(), true));
73 var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
81 $stmt = $db->prepare($sql);
82 $stmt->execute(array(':placeholder' => 1));
83 if ('00000' !== $stmt->errorCode())
85 var_export($stmt->errorCode(), true),
86 var_export($stmt->errorInfo(), true));
87 var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));