Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805

    dati che non si allineano per categoria

    salve secondo voi perche non mi allinea i dati delle categorie sotto ogni categoria , dove sto sbagliando?
    Codice PHP:
    $DB->connect();
    function 
    totale($cat_id){
    $result mysql_query("select * from knowledgebase where k_cat= $cat_id  and  visible ='1' and enable = '1' ");
    $tot=mysql_num_rows($result);
    return 
    $tot;


    $contolo_categoria mysql_query("select * from knowledgebase  where k_cat ='$id'   and enable ='1' order by id desc ");
    while(
    $array=mysql_fetch_array($contolo_categoria)){
    $contr_categoria =$array['k_cat'];

    //$smarty->assign("count_id",totale($array['id']));
    }
    $DB->connect();
    $result_cat_know mysql_query("select * from knowledgebase_cat  where enable ='1'  order by id desc ");
    $risultato_categoria_know mysql_num_rows($result_cat_know); 
    if(
    $risultato_categoria_know >0){
    while(
    $array=mysql_fetch_array($result_cat_know)){
    $estrazione_kat_know[$cnt]['id'] = $array['id'];
    $estrazione_kat_know[$cnt]['nome'] = $array['nome'];
    $cnt++;
    $smarty->assign("array_kat_know",$estrazione_kat_know);
    $id $array['id'];
    $title $array['nome'];
    $result_know mysql_query("select * from knowledgebase where  k_cat ='".$array['id']."' and  visible ='1'  and enable ='1' order by id desc limit 3" );
    $result_articl mysql_num_rows($result_know); 
    if(
    $result_articl >0){
    while(
    $array=mysql_fetch_array($result_know)){    

    $estrazione_knowledgebase[$cnt]['domanda_know'] = $array['domanda'];
    $estrazione_knowledgebase[$cnt]['data_know'] = $array['data'];         
    $smarty->assign("array_domanda_know",$estrazione_knowledgebase);
    }
    }
    else{
    $smarty->assign("domanda_know","<div class='textsfondo'>"._NO_ARTICLE_KNOWLDG."</div>");
    }
    }
    }else {
    $smarty->assign("domanda_know","<div class='textsfondo'>"._NO_CATEGORY_KNOWLDG."</div>");
    }
    $DB->connect();
    $result_cat_know mysql_query("select * from knowledgebase where k_cat ='0'   and  visible ='1' and enable ='1' order by id desc ");
    $result_cat mysql_num_rows($result_cat_know); 
    if(
    $result_cat >0){
    while(
    $array=mysql_fetch_array($result_cat_know)){
    $estrazione_knowledgebase_article[$cnt]['domanda_artile_know'] = $array['domanda']; 
    $estrazione_knowledgebase_article[$cnt]['data_artile_know']= $array['data'];    
    $cnt++; 
    $smarty->assign('array_domanda_article_know',$estrazione_knowledgebase_article);
    }

    e questo e dove vanno i dati
    codice:
    <table id='contenutitexticone' border="0" width="100%" cellpadding="0" cellspacing="0" >
      <tr>
      <td>
      
      
    <table class='knowtitle' border ='0'  cellpadding='0' cellspacing='0'  width="100%">
      <tr>
       <td>
    
    {foreach name=nome item=row from=$array_kat_know} 
    <table class = 'tablecatknow' border ='0' cellpadding='0' cellspacing='0' width="100%">
      <tr>
        <td class ='imagecategoryknow'>[img]../immagini/icon_folderyellow.gif[/img]</td>
         <td class ='categoryknow'> {$row.nome} <span class ='numerarticle'>{$count_id}</span></td>
        <td class ='rssiconknow'></td>
     </tr>
    </table>
    {/foreach}  
    
    
      </td>
    </tr>
    <tr>
      <td>
    
    {foreach name=nome item=row from=$array_domanda_know}  
    <table class = 'ultimiarticoliknow' border ='0' cellpadding='0' cellspacing='0' onMouseOver="javascript:this.className='navitem'" onMouseOut="javascript:this.className ='navitemhover'">
     <tr>
       <td class ='imagearticolokn'>[img]../immagini/icon_topicyellow.gif[/img]</td>
         <td class='articoloknow'>{$row.domanda_know}</td>
       <td   class ='dataarticoloknow'>{$row.data_know}</td>
     </tr>
    </table>
    {/foreach}
           </td>
        </tr>
    </table>
    
    
     </td>
     </tr>
      <tr>
      <td>
      
    <table class = 'tablecatlibertitleknow' border ='0' cellpadding='0' cellspacing='0'>
       <tr>
         <td class ='imagecategorylibertitleknow'>[img]../immagini/icon_articlelist.gif[/img]</td><td class ='categorylibertitleknow'>".ARTICLE."</td>
         <td class='rssiconknow'><a href ='$url_sito/rss/rss.php?id=$contr_categoria'>[img]../immagini/feedicon.gif[/img]</a></td>
       </tr>
    </table>
    {foreach name=nome item=row from=$array_domanda_article_know}  
    <table class = 'ultimiarticoliknow' border ='0' cellpadding='0' cellspacing='0' onMouseOver=\"javascript:this.className='navitem'\" onMouseOut=\"javascript:this.className ='navitemhover'\">
     <tr>
       <td class ='imagearticolokn'>[img]../immagini/icon_topicyellow.gif[/img]</td>
         <td class='articoloknow'>{$row.domanda_artile_know}</td>
         <td class ='dataarticoloknow'>{$row.data_artile_know}</td>
      </tr> 
    </table>
    {/foreach}
    
     </td>
     </tr>
    </table>
     
    
          </td>
        </tr>
    </table>
    secondo voi sto sbagliando qualcosa?
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  2. #2
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805
    salve sto smanettando , ma non riesco a capire il perche mi vede solo i dati della categoria prima
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  3. #3
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805
    comunque vi ringrazzio
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  4. #4
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805
    adesso mi vede solo gli articoli che anno l id 1 cosa potrebbe essere il problema? help italia
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.