Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
208dd75f
Commit
208dd75f
authored
Nov 10, 2011
by
Kim Hemsø Rasmussen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More of Stof's comments.
parent
88d16346
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
15 deletions
+11
-15
MysqliConnection.php
lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
+0
-2
MysqliException.php
lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php
+0
-2
MysqliStatement.php
lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
+11
-11
No files found.
lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
View file @
208dd75f
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...
...
lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php
View file @
208dd75f
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...
...
lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
View file @
208dd75f
...
...
@@ -19,12 +19,13 @@
namespace
Doctrine\DBAL\Driver\Mysqli
;
use
Doctrine\DBAL\Driver\Statement
;
use
PDO
;
/**
* @author Kim Hemsø Rasmussen <kimhemsoe@gmail.com>
*/
class
MysqliStatement
implements
\IteratorAggregate
,
\Doctrine\DBAL\Driver\
Statement
class
MysqliStatement
implements
\IteratorAggregate
,
Statement
{
private
static
$_paramTypeMap
=
array
(
PDO
::
PARAM_STR
=>
's'
,
...
...
@@ -220,14 +221,15 @@ class MysqliStatement implements \IteratorAggregate, \Doctrine\DBAL\Driver\State
$values
=
$this
->
_fetch
();
if
(
null
===
$values
)
{
return
null
;
}
elseif
(
false
===
$values
)
{
}
if
(
false
===
$values
)
{
throw
new
MysqliException
(
$this
->
_stmt
->
error
,
$this
->
_stmt
->
errno
);
}
$fetchStyle
=
$fetchStyle
?:
$this
->
_defaultFetchStyle
;
switch
(
$fetchStyle
)
{
switch
(
$fetchStyle
)
{
case
PDO
::
FETCH_NUM
:
return
$values
;
...
...
@@ -247,7 +249,7 @@ class MysqliStatement implements \IteratorAggregate, \Doctrine\DBAL\Driver\State
/**
* {@inheritdoc}
*/
public
function
fetchAll
(
$fetchStyle
=
\PDO
::
FETCH_BOTH
)
public
function
fetchAll
(
$fetchStyle
=
null
)
{
$a
=
array
();
while
((
$row
=
$this
->
fetch
(
$fetchStyle
))
!==
null
)
{
...
...
@@ -261,13 +263,11 @@ class MysqliStatement implements \IteratorAggregate, \Doctrine\DBAL\Driver\State
*/
public
function
fetchColumn
(
$columnIndex
=
0
)
{
$
values
=
$this
->
_fetch
(
);
if
(
null
===
$
values
)
{
$
row
=
$this
->
fetch
(
PDO
::
FETCH_NUM
);
if
(
null
===
$
row
)
{
return
null
;
}
elseif
(
false
===
$values
)
{
throw
new
MysqliException
(
$this
->
_stmt
->
error
,
$this
->
_stmt
->
errno
);
}
return
$
values
[
$columnIndex
];
return
$
row
[
$columnIndex
];
}
/**
...
...
@@ -300,7 +300,7 @@ class MysqliStatement implements \IteratorAggregate, \Doctrine\DBAL\Driver\State
*/
public
function
rowCount
()
{
if
(
false
===
$this
->
_columnNames
)
{
if
(
false
===
$this
->
_columnNames
)
{
return
$this
->
_stmt
->
affected_rows
;
}
return
$this
->
_stmt
->
num_rows
;
...
...
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