Please help the expert to explain the next paragraph of code in detail
Public Function Fetch_all_by_sql ($where, $order = ", $start = 0, $limit = 0, $count = 0, $alias =")
{
$where = $where &&!is_array ($where)? "WHERE $where": ';
if (Is_array ($order)) {
$order = ";
}
if ($count) {
Return Db::result_first (' SELECT count (*) from '. Db::table ($this->_table). '%i%i%i '. Db::limit ($start, $limit), Array ($alias, $where, $order));
}
Return Db::fetch_all (' SELECT * from '. Db::table ($this->_table). '%i%i%i '. Db::limit ($start, $limit), Array ($alias, $where, $order));
}
Reply to discussion (solution)
It's not clear where you can mark it.
It's not clear, yo.
Public Function Fetch_all_by_sql ($where, $order = ", $start = 0, $limit = 0, $count = 0, $alias =")
A database search function that can return the total number
Parameters: $where with SQL where
$order with SQL order
$start with SQL from which record starts to return
How many records $limit return
$count whether to return the number of search results record bars directly
Alias doesn't quite understand what it's about.
Not easy to see the reply of serious
Upstairs +1