Browse Source

Merge branch 'sql_criteria' of dimti.ru:majestic into sql_criteria

namespace
Alexander Demidov 11 years ago
parent
commit
e8e266a101
  1. 2
      model/SqlModel.php

2
model/SqlModel.php

@ -215,7 +215,7 @@ abstract class SqlModel extends Model
$order = isset($order['sort']) ? $this->order($order, $order['sort']) : false; $order = isset($order['sort']) ? $this->order($order, $order['sort']) : false;
$limit = $this->db->limitExpr($limit); $limit = $this->db->limitExpr($limit);
$result = $this->query( $result = $this->query(
(($sql_expression) ? $sql_expression : ('SELECT ' . $select . ' FROM ' . $this->table()))
(($sql_expression) ? $sql_expression : ('SELECT ' . $select . ' FROM ' . $this->identify($this->table())))
. (($where) ? (' WHERE ' . $where) : '') . (($where) ? (' WHERE ' . $where) : '')
. (($group_by) ? (' GROUP BY ' . $group_by) : '') . (($group_by) ? (' GROUP BY ' . $group_by) : '')
. (($order) ? ($order) : '') . (($order) ? ($order) : '')

Loading…
Cancel
Save