Fix join orden on query.
This commit is contained in:
parent
0613ecb373
commit
69c982b3e9
@ -113,6 +113,10 @@ class ModelMySQL {
|
|||||||
$sql .= ' FROM '.static::table();
|
$sql .= ' FROM '.static::table();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(static::$querySelect['innerJoin'] != '') {
|
||||||
|
$sql .= static::$querySelect['innerJoin'];
|
||||||
|
}
|
||||||
|
|
||||||
if (static::$querySelect['leftJoin'] != '') {
|
if (static::$querySelect['leftJoin'] != '') {
|
||||||
$sql .= static::$querySelect['leftJoin'];
|
$sql .= static::$querySelect['leftJoin'];
|
||||||
}
|
}
|
||||||
@ -121,10 +125,6 @@ class ModelMySQL {
|
|||||||
$sql .= static::$querySelect['rightJoin'];
|
$sql .= static::$querySelect['rightJoin'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(static::$querySelect['innerJoin'] != '') {
|
|
||||||
$sql .= static::$querySelect['innerJoin'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (static::$querySelect['where'] != '') {
|
if (static::$querySelect['where'] != '') {
|
||||||
$sql .= ' WHERE '.static::$querySelect['where'];
|
$sql .= ' WHERE '.static::$querySelect['where'];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user