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
6407b01c
Commit
6407b01c
authored
Mar 03, 2015
by
Alexander Butenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More valid getLastQuery() output
parent
c99d2610
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
MysqliDb.php
MysqliDb.php
+7
-5
No files found.
MysqliDb.php
View file @
6407b01c
...
...
@@ -329,7 +329,7 @@ class MysqliDb
if
(
$this
->
isSubQuery
)
return
;
$this
->
_query
=
"INSERT
into
"
.
self
::
$_prefix
.
$tableName
;
$this
->
_query
=
"INSERT
INTO
"
.
self
::
$_prefix
.
$tableName
;
$stmt
=
$this
->
_buildQuery
(
null
,
$insertData
);
$stmt
->
execute
();
$this
->
_stmtError
=
$stmt
->
error
;
...
...
@@ -721,8 +721,8 @@ class MysqliDb
$isUpdate
=
strpos
(
$this
->
_query
,
'UPDATE'
);
if
(
$isInsert
!==
false
)
{
$this
->
_query
.=
'(`'
.
implode
(
array_keys
(
$tableData
),
'`, `'
)
.
'`)'
;
$this
->
_query
.=
' VALUES('
;
$this
->
_query
.=
'
(`'
.
implode
(
array_keys
(
$tableData
),
'`, `'
)
.
'`)'
;
$this
->
_query
.=
' VALUES
('
;
}
else
$this
->
_query
.=
" SET "
;
...
...
@@ -778,7 +778,7 @@ class MysqliDb
return
;
//Prepair the where portion of the query
$this
->
_query
.=
' WHERE
'
;
$this
->
_query
.=
' WHERE'
;
// Remove first AND/OR concatenator
$this
->
_where
[
0
][
0
]
=
''
;
...
...
@@ -937,7 +937,9 @@ class MysqliDb
$val
=
$vals
[
$i
++
];
if
(
is_object
(
$val
))
$val
=
'[object]'
;
$newStr
.=
substr
(
$str
,
0
,
$pos
)
.
$val
;
if
(
$val
==
NULL
)
$val
=
'NULL'
;
$newStr
.=
substr
(
$str
,
0
,
$pos
)
.
"'"
.
$val
.
"'"
;
$str
=
substr
(
$str
,
$pos
+
1
);
}
$newStr
.=
$str
;
...
...
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