天空是藍(lán)色的

          做好軟件為中國 #gcc -c helloworld.c -o helloworld.o //編譯目標(biāo)文件 #gcc helloworld.o -o helloworld //編譯成可執(zhí)行exe #helloworld //運(yùn)行exe
          數(shù)據(jù)加載中……
          記一段代碼[PHP]迭代讀取數(shù)據(jù)庫


          <style>

          input, select {
          ?font-size: 14px;
          ?color: #333333;
          ?padding-left:3px;
          ?background:#f6f6f6;
          ?border: #CCCCCC 1px solid;}
          </style>
          <?php
          require_once dirname(__FILE__) ."/headers.php";

          $i = 0;
          ??

          function category($category_parent_timestamp){
          ???global $db;
          ???global $i;
          ???$result = $db->get("{category_parent_timestamp} == " . $category_parent_timestamp,null,"categories",false,"category_time","desc");
          ???sort($result);
          ??
          ???for($index=0;$index<count($result);$index++){??????????
          ?????echo "<option>";
          ?????for($x=0;$x<$i;$x++){
          ???????echo "--";
          ??????}??????
          ?????echo $result[$index]['category_title'];
          ?????echo "&nbsp;";??
          ?????$sub = $db->get("{category_parent_timestamp} == " .$result[$index]['category_timestamp'],null,"categories",false,"category_time","desc");
          ?????if(count($sub)!=0){
          ???????$i++;
          ???????category($result[$index]['category_timestamp']);//迭代??????
          ???????$i--;
          ?????}
          ?????echo "</option>";
          ???}
          ???
          }????
          ?
          echo "<select>";
          category("0");?
          echo"</select>";
          ?>

          posted on 2006-06-23 00:09 bluesky 閱讀(2967) 評論(2)  編輯  收藏 所屬分類: PHP

          評論

          # re: 記一段代碼[PHP]迭代讀取數(shù)據(jù)庫 2006-07-03 04:49 阿亮

          這么多全都要么?還是什么?復(fù)制好后把代碼放到哪了又要應(yīng)該注意哪些問題的?
          謝謝回答我的菜問題!
            回復(fù)  更多評論    

          # re: 記一段代碼[PHP]迭代讀取數(shù)據(jù)庫 2016-06-14 15:01 http://www.calvin-studio.fr

          請賜教!非常感激!
            回復(fù)  更多評論    
          主站蜘蛛池模板: 泰安市| 黄梅县| 武胜县| 怀集县| 吉木萨尔县| 昌宁县| 琼海市| 兴仁县| 罗城| 东阿县| 余庆县| 冕宁县| 成安县| 双辽市| 桃江县| 定安县| 吴川市| 南靖县| 丰城市| 肇源县| 山丹县| 永胜县| 中牟县| 建德市| 社会| 西宁市| 大英县| 通河县| 都兰县| 竹山县| 霸州市| 老河口市| 肇州县| 天等县| 乌海市| 金华市| 安乡县| 和平县| 普兰县| 永吉县| 颍上县|