Thứ Sáu, 9 tháng 10, 2015

[CodeIgniter] Protect Identifiers

Tắt protect identifiers.

For select: đặt parameter thứ 2 là false.
$this->db->select('topic.id, topic.name',FALSE);

For others:
$this->db->_protect_identifiers = FALSE;
$this->db->order_by('CASE WHEN sorter IN("", "0", NULL) THEN 1 ELSE 0 END, sorter ASC, id DESC');
$this->db->_protect_identifiers = TRUE;

Không có nhận xét nào:

Đăng nhận xét

Thời gian và chiếc lá

Thời gian trôi nhanh Đời người mong manh Như lá trên cành Rồi cũng hết xanh Đã rõ tử sanh Chẳng chuộng lợi danh Phong ý trong...