darstellen in spalte

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • darstellen in spalte

    hallo leute,


    möchte den kategorienamen in einer spalte, anstatt in einer zeile darstellen, bekomm das aber nicht hin.
    hoffe mir kann wer helfen. in der struktur sollre es so aussehen:

    artikelnummer: | titel: | kategorie:
    -----------------------------------------------------------------
    01245 | test | neues


    die entsprechende zeile:
    PHP-Code:
    displayCat$row['cat_id'] );
    echo 
    "      <a href=\"detail.php?cat={$row['cat_id']}&de={$row['ad_id']}\"></a></td>\n"
    setz ich den <a href>-tag an die stelle, wo normalerweise das datum steht, wird der kategoriename nicht in die spalte(n) geschrieben, sondern über die tabelle...


    hab kein plan von php, vielleicht kann ja jemand helfen...

    PHP-Code:

                
    echo "  <table border=\"0\" cellpaddig=\"0\" cellspacing=\"0\" width=\"600\">\n";
                echo 
    "    <tr class=\"frame\">\n";
                echo 
    "      <td width=\"20\" height=\"25\" align=\"right\"><font color=\"#FFFFFF\"><b>#</b></font></td>\n";
                echo 
    "      <td width=\"450\" height=\"25\" align=\"left\"><font color=\"#FFFFFF\"><b>Titel:</b></font></td>\n";
                echo 
    "      <td width=\"80\" height=\"25\" align=\"center\"><font color=\"#FFFFFF\"><b>Kategorie:</b></font></td>\n";
                echo 
    "      <td width=\"75\" height=\"25\" align=\"center\"><font color=\"#FFFFFF\"><b>Photo</b></font></td>\n";
                echo 
    "      <td width=\"75\" height=\"25\" align=\"center\"><font color=\"#FFFFFF\"><b>Detail</b></font></td>\n";
                echo 
    "    </tr>\n";
                echo 
    "    <tr>\n";
                echo 
    "      <td width=\"100%\" height=\"1\" colspan=\"5\" bgcolor=\"#FFFFFF\"></td>\n";
                echo 
    "    </tr>\n";
                if( 
    $totresult == )
                {
                    echo 
    "    <tr>\n";
                    echo 
    "      <td width=\"100%\" height=\"25\" colspan=\"5\" align=\"center\"><font size=\"4\">No Match Found</font>\n";
                    echo 
    "    </tr>\n";
                }
                
    $i 1;
                while( 
    $row mysql_fetch_array$result ) )
                {
                    echo 
    "    <tr class=\"detail\">\n";
                    echo 
    "      <td height=\"25\" align=\"right\">{$i}.</td>\n";
                    echo 
    "      <td height=\"25\">" substr$row['url'], 060 );
                    if( 
    strlen$row['subject'] ) > 60 ) echo "... ...";
                    echo 
    "</td>\n";

                    echo 
    "      <td height=\"25\" align=\"center\"><a href=\"detail.php?cat={$row['cat_id']}&de={$row['ad_id']}\"></a></td>\n";
                    echo 
    "      <td height=\"25\" align=\"center\">";
                    
    $photo mysql_query"SELECT photo_id FROM photo WHERE ad_id={$row['ad_id']}) or errormysql_error() );
                    if( 
    mysql_num_rows$photo ) >= ) echo "Yes";
                    else echo 
    "No";

                    echo 
    "        </td>\n";
                    echo 
    "      <td height=\"25\" align=\"center\"><a href=\"detail.php?cat={$row['cat_id']}&de={$row['ad_id']}\">Detail</a></td>\n";
                    echo 
    "        </tr>\n";
                    echo 
    "        <tr>\n";
                    echo 
    "      <td></td>\n";

                    
    //------------- zeigt auszug aus covertext --------------------------------------------------
                    //echo "      <td colspan=\"4\">" . substr( $row['descript'], 0, 300 );
                    //if( strlen( $row['descript'] ) > 300 ) echo "... ...";

                    
    echo "</td>\n";
                    echo 
    "    </tr>\n";
                    echo 
    "    <tr>\n";
                    echo 
    "      <td width=\"20\">\n";
                    echo 
    "      <td colspan=\"4\" align=\"left\">\n";
                    
    //------------- zeigt an, aus welcher kategorie -----------------------------------------------
                    
    displayCat$row['cat_id'] );
                    echo 
    "      <a href=\"detail.php?cat={$row['cat_id']}&de={$row['ad_id']}\"></a></td>\n";
                    echo 
    "    </tr>\n";
                    
    $i++;
                }
                echo 
    "    <tr>\n";
                echo 
    "      <td width=\"100%\" height=\"1\" colspan=\"5\" bgcolor=\"#808080\"></td>\n";
                echo 
    "    </tr>\n";
                echo 
    "    <tr>\n";
                echo 
    "      <td width=\"100%\" height=\"20\" colspan=\"5\"><small>Found <b>$totresult</b> matches keyword <b>$keywords</b></small></td>\n";
                echo 
    "    </tr>\n";
                echo 
    "  </table>\n"
    thx
    b.
    Zuletzt geändert von bastian; 22.08.2002, 11:40.
Lädt...
X