1. PHP / Говнокод #5911

    +158

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    function buildKust( $queryId )
    {
        $commentQuery = getElementsBy('queryncomment', 'query', $queryId);
        IF($commentQuery)
         foreach($commentQuery as $key=>$CQ)
          {
           $query = mysql_query("SELECT * FROM comments WHERE lev = 0 AND id = '".$CQ['comment']."' ");
           while($comment = mysql_fetch_array($query))
            $nullLevel[] = $comment; 
          } 
          IF($nullLevel)
         foreach($nullLevel as $key=>$nullComment)
          {
             $nullComment['level'] = 0;
              $brunch[0] = $nullComment;
            $kust[] = getChildren($nullComment,$brunch, 1);
          }      
      return $kust;
    }

    Коменты

    Запостил: GogaF, 06 Марта 2011

    Комментарии (3) RSS

    Добавить комментарий