Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
X Lib
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
XLibs
X Lib
Commits
52dc50c4
Commit
52dc50c4
authored
Jun 26, 2017
by
Alex Ne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Баг на сложных запросах
parent
f5f54b54
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
PDOStatement.php
Database/Driver/PDOStatement.php
+1
-1
PDOWhereConstructor.php
Database/Driver/PDOWhereConstructor.php
+2
-3
No files found.
Database/Driver/PDOStatement.php
View file @
52dc50c4
<?php
namespace
X\Database\Driver
;
use
\
X\ETrace\System
as
ESys
;
use
X\ETrace\System
as
ESys
;
class
PDOStatement
{
/**
...
...
Database/Driver/PDOWhereConstructor.php
View file @
52dc50c4
...
...
@@ -77,9 +77,8 @@ class PDOWhereConstructor {
/**
* @param $data
*/
private
function
build_where_string
(
$data
,
$inner_level
=
0
,
$operator
=
"AND"
)
{
private
function
build_where_string
(
$data
,
$inner_level
=
0
,
$operator
=
"AND"
,
$key_index
=
0
)
{
$SQL_Fragment_Items
=
""
;
$key_index
=
0
;
foreach
(
$data
as
$key
=>
$value
)
{
$item_info
=
$this
->
check_data_item
(
$key
,
$value
,
$inner_level
,
$operator
);
if
(
$item_info
[
"type"
]
==
"column"
)
{
...
...
@@ -99,7 +98,7 @@ class PDOWhereConstructor {
$SQL_Fragment_Items
[]
=
"`
{
$item_info
[
"name"
]
}
`
{
$item_info
[
"operator"
]
}
{
$data_key
}
"
;
}
}
else
{
$level_data
=
$this
->
build_where_string
(
$value
,
(
$inner_level
+
1
),
$item_info
[
"operator"
]);
$level_data
=
$this
->
build_where_string
(
$value
,
(
$inner_level
+
1
),
$item_info
[
"operator"
]
,
++
$key_index
);
$SQL_Fragment_Items
[]
=
"(
{
$level_data
}
)"
;
}
$key_index
++
;
...
...
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