Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
afi
zf
Commits
dae6634a
Commit
dae6634a
authored
Nov 17, 2015
by
efalcy
Browse files
Merge branch 'mysqlnd-speed-adaptation' into 'master'
Mysqlnd speed adaptation See merge request
!2
parents
5aa5e6dc
bd4d12b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
library/Zend/Db/Statement/Mysqli.php
library/Zend/Db/Statement/Mysqli.php
+36
-0
No files found.
library/Zend/Db/Statement/Mysqli.php
View file @
dae6634a
...
...
@@ -272,6 +272,42 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
}
/**
* Returns an array containing all of the result set rows.
*
* @param int $style OPTIONAL Fetch mode.
* @param int $col OPTIONAL Column number, if fetch mode is by column.
* @return array Collection of rows, each in a format by the fetch mode.
*/
public
function
fetchAll
(
$style
=
null
,
$col
=
null
)
{
if
(
$style
!==
Zend_Db
::
FETCH_COLUMN
)
{
$this
->
_stmt
->
execute
();
return
$this
->
_stmt
->
get_result
()
->
fetch_all
(
$style
===
Zend_Db
::
FETCH_NUM
?
MYSQLI_NUM
:
MYSQLI_ASSOC
);
}
$data
=
array
();
if
(
$style
===
Zend_Db
::
FETCH_COLUMN
&&
$col
===
null
)
{
$col
=
0
;
}
if
(
$col
===
null
)
{
while
(
$row
=
$this
->
fetch
(
$style
))
{
$data
[]
=
$row
;
}
}
else
{
while
(
$val
=
$this
->
fetchColumn
(
$col
))
{
$data
[]
=
$val
;
}
}
return
$data
;
}
/**
* Fetches a row from the result set.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment