Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions ext/pdo/tests/pdo_039.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,29 @@ if ($pass === false) $pass = NULL;

$conn = new PDO($dsn, $user, $pass, $attr);

$query = 'SELECT 1';
var_dump($conn->errorCode());

$query = 'SELECT 1';
if ($conn->getAttribute(PDO::ATTR_DRIVER_NAME) === 'oci') {
$query .= ' FROM DUAL';
}
var_dump($conn->errorCode());
$stmt = $conn->prepare($query);
var_dump($conn->errorCode());

$stmt = $conn->prepare($query);
var_dump($conn->errorCode());
var_dump($stmt->errorCode());

$stmt->execute();
var_dump($stmt->errorCode());
var_dump($stmt->errorCode());

?>
--EXPECT--
NULL
string(5) "00000"
string(5) "00000"
string(5) "00000"
NULL
string(5) "00000"
string(5) "00000"
11 changes: 1 addition & 10 deletions ext/pdo_oci/tests/pdo_oci_quote1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $stmt = $db->prepare('select * from poq_tab');
// The intent is that the fetched data be identical to the unquoted string.
// Remember!: use bind variables instead of PDO->quote()

$a = array(null, "", "a", "ab", "abc", "ab'cd", "a\b\n", "'", "''", "a'", "'z", "a''b", '"');
$a = array("", "a", "ab", "abc", "ab'cd", "a\b\n", "'", "''", "a'", "'z", "a''b", '"');
foreach ($a as $u) {
$q = $db->quote($u);
echo "Unquoted : ";
Expand All @@ -42,15 +42,6 @@ echo "Done\n";

?>
--EXPECT--
Unquoted : NULL
Quoted : string(2) "''"
array(1) {
[0]=>
array(1) {
["t"]=>
NULL
}
}
Unquoted : string(0) ""
Quoted : string(2) "''"
array(1) {
Expand Down