Rev 1116 | Rev 1152 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1116 | Rev 1130 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | // phpcs:disable PSR1.Files.SideEffects |
22 | // phpcs:disable PSR1.Files.SideEffects |
23 | \defined('INSIDE_OIDPLUS') or die; |
23 | \defined('INSIDE_OIDPLUS') or die; |
24 | // phpcs:enable PSR1.Files.SideEffects |
24 | // phpcs:enable PSR1.Files.SideEffects |
25 | 25 | ||
26 | class OIDplusQueryResultODBC extends OIDplusQueryResult { |
26 | class OIDplusQueryResultODBC extends OIDplusQueryResult { |
- | 27 | /** |
|
- | 28 | * @var bool |
|
- | 29 | */ |
|
27 | protected $no_resultset; |
30 | protected $no_resultset; |
- | 31 | ||
- | 32 | /** |
|
- | 33 | * @var mixed |
|
- | 34 | */ |
|
28 | protected $res; |
35 | protected $res; |
29 | 36 | ||
30 | /** |
37 | /** |
31 | * @param $res |
38 | * @param mixed $res |
32 | */ |
39 | */ |
33 | public function __construct($res) { |
40 | public function __construct($res) { |
34 | $this->no_resultset = is_bool($res); |
41 | $this->no_resultset = is_bool($res); |
35 | 42 | ||
36 | if (!$this->no_resultset) { |
43 | if (!$this->no_resultset) { |
Line 54... | Line 61... | ||
54 | 61 | ||
55 | /** |
62 | /** |
56 | * @return int |
63 | * @return int |
57 | */ |
64 | */ |
58 | private function num_rows_workaround(): int { |
65 | private function num_rows_workaround(): int { |
59 | $dummy = 0; |
66 | $dummy = array(); |
60 | 67 | ||
61 | // go to the end of the result set |
68 | // go to the end of the result set |
62 | $till_eof = 0; |
69 | $till_eof = 0; |
63 | while ($temp = odbc_fetch_into($this->res, $dummy)) $till_eof++; |
70 | while ($temp = odbc_fetch_into($this->res, $dummy)) $till_eof++; |
64 | 71 |