Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
3c507c0042
|
@ -74,9 +74,9 @@ class utils
|
|||
}
|
||||
|
||||
public function get_engines($user_id) {
|
||||
$sql = 'SELECT m.file AS id, e.make AS make, e.code AS code FROM msqur_metadata m '.
|
||||
'JOIN (SELECT id,name,make,code FROM msqur_engines WHERE user_id = ' . (int) $user_id . ') e '.
|
||||
'WHERE m.engine = e.id GROUP BY e.name ORDER BY m.file DESC';
|
||||
$sql = 'SELECT MAX(m.file) AS id, e.make AS make, e.code AS code FROM msqur_engines e ' .
|
||||
'INNER JOIN msqur_metadata m ON m.engine = e.id WHERE (user_id = ' . (int) $user_id . ') '.
|
||||
'GROUP BY e.name';
|
||||
|
||||
$result = $this->db->sql_query($sql);
|
||||
$output = array();
|
||||
|
|
Loading…
Reference in New Issue