$sql = "select t1.*,t2.cat_name as catname from goods as t1,category as t2 where t1.cat_id = t2.cat_name;";
$result = $model -> query($sql);
$count = $model -> count();
The set after linked list query cannot be solved using count statistics. .