Lines Matching refs:PDO
2 MySQL PDO:query() vs. PDO::prepare() and MySQL error 2050
20 $db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, 0);
21 if (0 != $db->getAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY))
26 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
28 var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
30 var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
34 $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
36 var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
41 PDO::query() will prepare and execute a statement in one step.
42 After the execution of PDO::query(), MySQL expects you to fetch
44 PHP/PDO will send a CLOSE message as part of the PDO::query() call.
48 $stmt = PDO::query(<some query>)
56 $stmt = PDO::query(<some query>)
57 PDO::query(<some query>)
63 $stmt = PDO::query(<some query>)
66 zval representing the current value of $stmt. PDO gets a callback that
78 PDO to $stmt.
83 - as there is no explicit close() in PDO, try unset($stmt) before the new assignment
84 - fix PDO::query() [not the driver, fix PDO itself]
88 var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
92 var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
96 var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
100 var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
104 var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));