Skip to content

Commit cf5df8e

Browse files
committed
Update
1 parent 0808b34 commit cf5df8e

File tree

10 files changed

+45
-35
lines changed

10 files changed

+45
-35
lines changed

SuperSQL/SuperSQL.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ function __construct($dsn, $user, $pass)
5353
*/
5454
function SELECT($table, $columns = array(), $where = array(), $join = null, $limit = false)
5555
{
56-
if ((is_int($join) || is_string($join) || isset($join[0])) && !$limit) {
56+
if (!$limit && (isset($join['ORDER']) ||
57+
isset($join['!ORDER']) ||
58+
isset($join['GROUP']) ||
59+
isset($join['LIMIT']) ||
60+
isset($join['OFFSET']) ||
61+
is_int($join) || is_string($join) || isset($join[0]))) {
5762
$limit = $join;
5863
$join = null;
5964
}

SuperSQL/lib/parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ static function SELECT($table, $columns, $where, $join, $limit)
494494
if (isset($limit['ORDER'])) {
495495
$sql .= ' ORDER BY ' . self::quote($limit['ORDER']);
496496
} else if (isset($limit['!ORDER'])) {
497-
$sql .= ' ORDER BY ' . self::quote($limit['ORDER']) . ' DESC';
497+
$sql .= ' ORDER BY ' . self::quote($limit['!ORDER']) . ' DESC';
498498
}
499499
if (isset($limit['LIMIT'])) {
500500
$sql .= ' LIMIT ' . (int) $limit['LIMIT'];

builder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SOFTWARE.
2323
*/
2424

2525

26-
var version = "1.1.5";
26+
var version = "1.1.6";
2727

2828
var today = new Date();
2929
var dd = today.getDate();

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "threeletters/supersql",
33
"description": "SlickInject and Medoo on steroids - The most advanced and lightweight library of its kind.",
4-
"version": "1.1.5",
4+
"version": "1.1.6",
55
"type": "framework",
66
"keywords": ["SQL", "database", "small", "lightweight", "advanced", "MySQL"],
77
"homepage": "https://threeletters.github.io/SuperSQL/",

dist/README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,37 @@
77

88
### Sizes
99

10-
* `SuperSQL.php` - 28558 Chars (28.6 MB)
11-
* `SuperSQL_min.php` - 12644 Chars (12.6 MB)
10+
* `SuperSQL.php` - 28810 Chars (28.8 MB)
11+
* `SuperSQL_min.php` - 12747 Chars (12.7 MB)
1212
* `SuperSQL_helper.php` - 11234 Chars (11.2 MB)
1313
* `SuperSQL_helper_min.php` - 5558 Chars (5.6 MB)
14-
* `SuperSQL_complete_min.php` - 17922 Chars (17.9 MB)
14+
* `SuperSQL_complete_min.php` - 18025 Chars (18 MB)
1515

1616
## Hashes
1717

1818
```
19-
* SuperSQL.php - e66095702fc3364ed5b60ab9c58284c2
20-
* SuperSQL_min.php - 4137ec30163845fb4142ee63363d7ebe
21-
* SuperSQL_helper.php - adaddf5e3cdf5f612a55b3f13f918bd1
22-
* SuperSQL_helper_min.php - e4319fa820edaa9ce87b904569424295
23-
* SuperSQL_complete.php - 13985e2acec0e184772666c5b02feafb
19+
* SuperSQL.php - ef68d9f5a5223d8dc8a1e5c9710fee2a
20+
* SuperSQL_min.php - cb59dc4145f4f928ab0420dbf12cf63a
21+
* SuperSQL_helper.php - c28eb974df4b6b59cfd1703b93ba5ad5
22+
* SuperSQL_helper_min.php - 434f45d06501865c04386f32874637bf
23+
* SuperSQL_complete.php - 12d192dc93e6bb86d0bc32caf98f2de1
2424
```
2525

2626
## Performance
2727

2828
Profiled on PHP v7.1.4, 30 loops
2929

3030

31-
0.0218ms Average Time, Sum: 0.6541ms
31+
0.023ms Average Time, Sum: 0.6896ms
3232

3333
### Specifics
3434

3535
| Name | Avg | Sum |
3636
|-------------------------|--------|--------|
37-
| 1 Row Insert | 0.0013 | 0.0388 |
38-
| 100 R Insert W Temp | 0.0162 | 0.4846 |
39-
| Select * | 0.0007 | 0.0206 |
40-
| Select * W Cast | 0.0006 | 0.0169 |
41-
| Select * W Cast W where | 0.0007 | 0.0197 |
42-
| 1 Row Update | 0.0013 | 0.0401 |
43-
| Delete | 0.001 | 0.0311 |
37+
| 1 Row Insert | 0.0013 | 0.038 |
38+
| 100 R Insert W Temp | 0.0173 | 0.5191 |
39+
| Select * | 0.0007 | 0.02 |
40+
| Select * W Cast | 0.0006 | 0.0178 |
41+
| Select * W Cast W where | 0.0007 | 0.0201 |
42+
| 1 Row Update | 0.0014 | 0.0413 |
43+
| Delete | 0.001 | 0.0309 |

dist/SuperSQL.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Author: Andrews54757
44
License: MIT (https://github.com/ThreeLetters/SuperSQL/blob/master/LICENSE)
55
Source: https://github.com/ThreeLetters/SQL-Library
6-
Build: v1.1.5
7-
Built on: 16/04/2018
6+
Build: v1.1.6
7+
Built on: 23/07/2018
88
*/
99

1010
namespace SuperSQL;
@@ -639,7 +639,7 @@ static function SELECT($table, $columns, $where, $join, $limit)
639639
if (isset($limit['ORDER'])) {
640640
$sql .= ' ORDER BY ' . self::quote($limit['ORDER']);
641641
} else if (isset($limit['!ORDER'])) {
642-
$sql .= ' ORDER BY ' . self::quote($limit['ORDER']) . ' DESC';
642+
$sql .= ' ORDER BY ' . self::quote($limit['!ORDER']) . ' DESC';
643643
}
644644
if (isset($limit['LIMIT'])) {
645645
$sql .= ' LIMIT ' . (int) $limit['LIMIT'];
@@ -793,7 +793,12 @@ function __construct($dsn, $user, $pass)
793793
}
794794
function SELECT($table, $columns = array(), $where = array(), $join = null, $limit = false)
795795
{
796-
if ((is_int($join) || is_string($join) || isset($join[0])) && !$limit) {
796+
if (!$limit && (isset($join['ORDER']) ||
797+
isset($join['!ORDER']) ||
798+
isset($join['GROUP']) ||
799+
isset($join['LIMIT']) ||
800+
isset($join['OFFSET']) ||
801+
is_int($join) || is_string($join) || isset($join[0]))) {
797802
$limit = $join;
798803
$join = null;
799804
}

dist/SuperSQL_complete.php

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

dist/SuperSQL_helper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Author: Andrews54757
44
License: MIT (https://github.com/ThreeLetters/SuperSQL/blob/master/LICENSE)
55
Source: https://github.com/ThreeLetters/SQL-Library
6-
Build: v1.1.5
7-
Built on: 16/04/2018
6+
Build: v1.1.6
7+
Built on: 23/07/2018
88
*/
99

1010
namespace SuperSQL;

dist/SuperSQL_helper_min.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Author: Andrews54757
44
License: MIT (https://github.com/ThreeLetters/SuperSQL/blob/master/LICENSE)
55
Source: https://github.com/ThreeLetters/SQL-Library
6-
Build: v1.1.5
7-
Built on: 16/04/2018
6+
Build: v1.1.6
7+
Built on: 23/07/2018
88
*/
99

1010
namespace SuperSQL;

dist/SuperSQL_min.php

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)