From: Marcus Boerger Date: Sat, 21 May 2005 14:47:33 +0000 (+0000) Subject: - fetchSingle() was renamed to fetchColumn() X-Git-Tag: php-5.0.1b1~199 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0eb7282f98ff60fd77b534e01588c1fde65fcad9;p=php - fetchSingle() was renamed to fetchColumn() --- diff --git a/ext/pdo/tests/pdo_016.inc b/ext/pdo/tests/pdo_016.inc index 3fece6e2ad..09d43d93d9 100755 --- a/ext/pdo/tests/pdo_016.inc +++ b/ext/pdo/tests/pdo_016.inc @@ -17,7 +17,7 @@ $DB->exec($SQL['create1']); var_dump($DB->exec($SQL['insert1'])); var_dump($DB->exec($SQL['insert2'])); var_dump($DB->exec($SQL['insert3'])); -var_dump($DB->query($SQL['select1'])->fetchSingle()); +var_dump($DB->query($SQL['select1'])->fetchColumn()); $cont = $DB->query($SQL['select2'])->fetchAll(PDO_FETCH_COLUMN|PDO_FETCH_UNIQUE); var_dump($cont); diff --git a/ext/pdo/tests/pdo_017.inc b/ext/pdo/tests/pdo_017.inc index 7c198a43fa..7a2fe4739e 100755 --- a/ext/pdo/tests/pdo_017.inc +++ b/ext/pdo/tests/pdo_017.inc @@ -12,7 +12,7 @@ set_sql('delete', 'DELETE FROM test'); function countRows($DB, $action) { global $SQL; $stmt = $DB->query($SQL['select']); - $res = $stmt->fetchSingle(); + $res = $stmt->fetchColumn(); return "Counted $res rows after $action.\n"; } diff --git a/ext/pdo/tests/pdo_018.inc b/ext/pdo/tests/pdo_018.inc index 4298ac48e2..03bc1eb0ec 100755 --- a/ext/pdo/tests/pdo_018.inc +++ b/ext/pdo/tests/pdo_018.inc @@ -76,7 +76,7 @@ var_dump($DB->exec($SQL['insert1'])); var_dump($DB->exec($SQL['insert2'])); var_dump($DB->exec($SQL['insert3'])); $DB->exec($SQL['create2']); -var_dump($DB->query($SQL['selectC'])->fetchSingle()); +var_dump($DB->query($SQL['selectC'])->fetchColumn()); var_dump($DB->query($SQL['select0'])->fetchAll(PDO_FETCH_COLUMN|PDO_FETCH_UNIQUE)); $objs = array(); @@ -138,7 +138,7 @@ catch (PDOException $e) } echo "===COUNT===\n"; -var_dump($DB->query($SQL['select4'])->fetchSingle()); +var_dump($DB->query($SQL['select4'])->fetchColumn()); echo "===DATABASE===\n"; var_dump($DB->query($SQL['select5'])->fetchAll(PDO_FETCH_ASSOC)); diff --git a/ext/pdo/tests/pdo_019.inc b/ext/pdo/tests/pdo_019.inc index a61ebd3eed..f9c81a251f 100755 --- a/ext/pdo/tests/pdo_019.inc +++ b/ext/pdo/tests/pdo_019.inc @@ -17,7 +17,7 @@ var_dump($DB->exec($SQL['insert1'])); var_dump($DB->exec($SQL['insert2'])); var_dump($DB->exec($SQL['insert3'])); var_dump($DB->exec($SQL['insert4'])); -var_dump($DB->query($SQL['select1'])->fetchSingle()); +var_dump($DB->query($SQL['select1'])->fetchColumn()); $cont = $DB->query($SQL['select2'])->fetchAll(PDO_FETCH_COLUMN|PDO_FETCH_UNIQUE); var_dump($cont); diff --git a/ext/pdo/tests/pdo_021.inc b/ext/pdo/tests/pdo_021.inc index 48489f5b38..a566087f9d 100755 --- a/ext/pdo/tests/pdo_021.inc +++ b/ext/pdo/tests/pdo_021.inc @@ -25,7 +25,7 @@ foreach ($data as $row) { } $select = $DB->query($SQL['select']); -$num = $select->fetchSingle(); +$num = $select->fetchColumn(); echo 'There are ' . $num . " rows in the table.\n"; // Insert using named parameters @@ -36,7 +36,7 @@ foreach ($data as $row) { } $select = $DB->query($SQL['select']); -$num = $select->fetchSingle(); +$num = $select->fetchColumn(); echo 'There are ' . $num . " rows in the table.\n"; ?> diff --git a/ext/pdo/tests/pdo_024.inc b/ext/pdo/tests/pdo_024.inc index 60bb30a77c..a3fe3a4969 100755 --- a/ext/pdo/tests/pdo_024.inc +++ b/ext/pdo/tests/pdo_024.inc @@ -17,5 +17,5 @@ if ($name !== $before_bind) { echo "bind: success\n"; } var_dump($stmt->execute()); -var_dump($DB->query($SQL['select'])->fetchSingle()); +var_dump($DB->query($SQL['select'])->fetchColumn()); ?>