Created
September 27, 2011 22:56
-
-
Save dodyw/1246498 to your computer and use it in GitHub Desktop.
indexu bug fix #18 Links Count Bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cat_build_stat($category_id) { | |
global $lep; | |
$children = cat_get_children($category_id); | |
$children[] = $category_id; | |
$children_str = implode(', ',$children); | |
$query = "select count(res_id) from lep_resource where category_id in ($children_str) and suspended = 0 and status = 1"; | |
$num_res = $lep->db->GetOne($query); | |
$query = "update lep_category set num_res = '$num_res' where category_id = '$category_id'"; | |
$rs = $lep->db->Execute($query); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment