Hàm: select_table_row_data_by_where()

By Khỉ đầu chó lông xoăn, 52388 View
Hàm này trả về mảng dữ liệu tương ứng với trường với điều kiện cho trước.

Cú pháp:
select_table_row_data_by_where(table_name, where)

Trong đó:
- table_name (string): tên bảng
- where (array): điều kiện so sánh bằng dữ liệu với trường tương ứng
where:
    colunn_name => column_value


Nếu chỉ có 1 điều kiện, ta có thể dùng hàm select_table_row_data(), đây là một hàm con của select_table_row_data_by_where(), cú pháp như sau:
select_table_row_data(table_name, column_name, column_value)


Ví dụ:
{{select_table_row_data('chatbox','id',1).name}}