Jump to content

sanjayshiwakoti

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Everything posted by sanjayshiwakoti

  1. <?php header("Content-type: text/css"); $white = '#fff'; $dkgray = '#333'; $dkgreen = '#008400'; ?> body { background:<?=$white?>; color:<?=$dkgray?>; } h1, h2, h3, h4 { color:<?=$dkgreen?>; } blockquote { color:<?=$dkgreen?>; } you can controll all the stuffs by get variable
  2. Please Help me or this difficult question to you
  3. i'm making a hierarchical Order list for this i've created database where parameter_cd,parameter_desc,upper_parameter_cd my page is like this $Sql="select p.parameter_cd, p.parameter_desc, p.upper_parameter_cd, level, (select count(*) from parameter WHERE parameter_cd <> p.parameter_cd start with parameter_cd = p.parameter_cd connect by prior parameter_cd = upper_parameter_cd and upper_parameter_cd=p.parameter_cd ) no_of_childs from parameter p start with upper_parameter_cd is null connect by prior parameter_cd = upper_parameter_cd"; $objTree=new Sandee; $objTree->dbQuery($Sql); <ul id="dhtmlgoodies_tree2" class="dhtmlgoodies_tree"> <? $old_value_level=NULL; $old_upper_cd=NULL; $counter = 0; $no_of_childs =array(); $i=0; while($dataTree=$objTree->dbFetchArray(1)){ ?> <li id="node<?=$dataTree['PARAMETER_CD']?>"><a href="#"><?=$dataTree['PARAMETER_DESC']?></a> <? if($dataTree['NO_OF_CHILDS']>0){ print "<ul>"; }else if($dataTree['NO_OF_CHILDS']==0){ print "</li>"; } if(($no_of_childs == 0 && trim($no_of_childs)!= '')) print "</ul></li>"; //I know here is the error //Couln't find the logic else{ $no_of_childs--; } ?> <? $old_value_level=$dataTree['LEVEL']; } ?> </ul> This is true if there is only up to two child but in multiple child it can't display the data properly Please any sugession
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.