1 | <?php |
||
15 | trait Fetchable |
||
16 | { |
||
17 | /** |
||
18 | * Executes a query and returns the first row. |
||
19 | * |
||
20 | * @param int $style PDO fetch style |
||
21 | * |
||
22 | * @return mixed|bool result |
||
23 | */ |
||
24 | public function one($style = PDO::FETCH_ASSOC) |
||
34 | |||
35 | /** |
||
36 | * Executes a query and returns all of the rows. |
||
37 | * |
||
38 | * @param int $style PDO fetch style |
||
39 | * |
||
40 | * @return mixed|bool result |
||
41 | */ |
||
42 | public function all($style = PDO::FETCH_ASSOC) |
||
52 | |||
53 | /** |
||
54 | * Executes a query and returns a column from all rows. |
||
55 | * |
||
56 | * @param int $index zero-indexed column to fetch |
||
57 | * |
||
58 | * @return mixed|bool result |
||
59 | */ |
||
60 | public function column($index = 0) |
||
70 | |||
71 | /** |
||
72 | * Executes a query and returns a value from the first row. |
||
73 | * |
||
74 | * @param int $index zero-indexed column to fetch |
||
75 | * |
||
76 | * @return mixed|bool result |
||
77 | */ |
||
78 | public function scalar($index = 0) |
||
88 | } |
||
89 |