1
0
Fork 0
SVEN/webseite/sys/sources/envms-fluentpdo/tests/25-fetch-pairs-fetch-all.phpt

39 lines
639 B
PHP

--TEST--
fetch pairs, fetch all
--FILE--
<?php
include_once dirname(__FILE__) . "/connect.inc.php";
/* @var Envms\FluentPDO\Query */
$result = $fluent->from('user')->fetchPairs('id', 'name');
print_r($result);
$result = $fluent->from('user')->fetchAll();
print_r($result);
?>
--EXPECTF--
Array
(
[1] => Marek
[2] => Robert
)
Array
(
[0] => Array
(
[id] => 1
[country_id] => 1
[type] => admin
[name] => Marek
)
[1] => Array
(
[id] => 2
[country_id] => 1
[type] => author
[name] => Robert
)
)