Commit | Line | Data |
---|---|---|
bc13d5d6 H |
1 | <? |
2 | ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/:/home/hromi1/kyberia/config"); | |
3 | include_once("kyberia.inc"); | |
4 | $database=new CLASS_KYBERIA(); | |
5 | $q="select * from forum"; | |
6 | $set=$database->query($q); | |
7 | while($set->next()) { | |
8 | $q="select count(*) as pocet from submissions where forum_id='".$set->getString('forum_id')."'"; | |
9 | $set2=$database->query($q); | |
10 | $set2->next(); | |
11 | $q="select submission_timestamp from submissions where forum_id='".$set->getString('forum_id')."' order by submission_timestamp desc limit 1"; | |
12 | $set3=$database->query($q); | |
13 | $set3->next(); | |
14 | $q="update forum set last_submission='".$set3->getString('submission_timestamp')."', forum_submissions='".$set2->getString('pocet')."' where forum_id='".$set->getString('forum_id')."'"; | |
15 | echo $q."<br>"; | |
16 | $database->query($q); | |
17 | } | |
18 | ?> |