Commit | Line | Data |
---|---|---|
bc13d5d6 H |
1 | <? |
2 | include_once("../inc/kyberia.inc"); | |
3 | $database=new CLASS_KYBERIA(); | |
4 | $q="select forum_id from category"; | |
5 | $set=$database->query($q); | |
6 | while($set->next()) { | |
7 | $q="select count(*) as pocet from forum where forum_category='".$set->getString('category_id')."'"; | |
8 | $set2=$database->query($q); | |
9 | $set2->next(); | |
10 | $q="select count(*) as pocet from category where category_parent='".$set->getString('category_id')."'"; | |
11 | $set3=$database->query($q); | |
12 | $set3->next(); | |
13 | $q="update category set category_subcats='".$set3->getString('pocet')."',category_forums='".$set2->getString('pocet')."' where category_id='".$set->getString('category_id')."'"; | |
14 | echo $q."<br>"; | |
15 | $database->query($q); | |
16 | } | |
17 | ?> |