Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PHP-MySQLi-Database-Class
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
Kulya
PHP-MySQLi-Database-Class
Commits
f68a33d6
Commit
f68a33d6
authored
9 years ago
by
Alexander Butenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #210 empty getLastQuery after rawQuery() execution
parent
76f43dd3
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
MysqliDb.php
MysqliDb.php
+2
-1
No files found.
MysqliDb.php
View file @
f68a33d6
...
...
@@ -218,6 +218,7 @@ class MysqliDb
*/
public
function
rawQuery
(
$query
,
$bindParams
=
null
,
$sanitize
=
true
)
{
$params
=
array
(
''
);
// Create the empty 0 index
$this
->
_query
=
$query
;
if
(
$sanitize
)
$this
->
_query
=
filter_var
(
$query
,
FILTER_SANITIZE_STRING
,
...
...
@@ -225,7 +226,6 @@ class MysqliDb
$stmt
=
$this
->
_prepareQuery
();
if
(
is_array
(
$bindParams
)
===
true
)
{
$params
=
array
(
''
);
// Create the empty 0 index
foreach
(
$bindParams
as
$prop
=>
$val
)
{
$params
[
0
]
.=
$this
->
_determineType
(
$val
);
array_push
(
$params
,
$bindParams
[
$prop
]);
...
...
@@ -237,6 +237,7 @@ class MysqliDb
$stmt
->
execute
();
$this
->
_stmtError
=
$stmt
->
error
;
$this
->
_lastQuery
=
$this
->
replacePlaceHolders
(
$this
->
_query
,
$params
);
$this
->
reset
();
return
$this
->
_dynamicBindResults
(
$stmt
);
...
...
This diff is collapsed.
Click to expand it.
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