<br /><br /><table border="0" width="100%" cellspacing="1"> <tr> <td colspan="3" width="100%" style="border: 1px solid #000; background-color: #333; padding: 5px; height: 40px; color: #eee;"><?php echo $forum_title; ?></td> </tr> <tr style="background-color: #777; color: #eee;"> <td width="60%">Nazwa tematu</td> <td width="20%">Odpowiedzi</td> <td width="20%">Wyświetleń</td> </tr> <?php $thread_posts = @mysql_num_rows(mysql_query("SELECT `id_thread` FROM `odpowiedzi` WHERE `id`='$id'")); $ide = $wiersz['id']; $thread_posts = @mysql_num_rows(mysql_query("SELECT `id_thread` FROM `odpowiedzi` WHERE `id`='$ide'")); { <tr style="background-color: #cfe2ff;"> <td valign="top"><div style="font-size: 15px; color: #fff;"><a href="index.php?action=thread&id='.$wiersz['id'].'">'.$wiersz['temat'].'</a></div><div style="padding-top: 4px; padding-left: 20px; font-size: 11px;">'.$wiersz['opis'].'</div></td> <td valign="top">'.$thread_posts.'</td> <td valign="top">0</td> </tr> '); } ?> </table>
Tabela `odpowiedzi` wygląda tak:
Cytat
id_thread | autor_reply | post_reply
Tabela `tematy`:
Cytat
id | autor | temat | opis | post
Proszę o pomoc.