![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 48 Pomógł: 0 Dołączył: 1.08.2008 Ostrzeżenie: (0%) ![]() ![]() |
Witajcie mam mały problem
chce wpleść w zapytanie Kod SELECT newsy.id, DATE_FORMAT(newsy.dodano, '%e-%m-%Y %H:%i') AS utworzono, newsy.autor, newsy.tresc, newsy.temat , newsy.cat , COUNT(lp) AS il_kom FROM newsy LEFT JOIN komentarze ON (komentarze.id=newsy.id) GROUP BY newsy.id ORDER BY newsy.dodano DESC takie cos Kod WHERE `cat` = $_GET['cat'] ale coś mi nie wychodzi czy mógłbym prosić o pomoc Ten post edytował devil-war 8.08.2008, 19:14:07 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 48 Pomógł: 0 Dołączył: 1.08.2008 Ostrzeżenie: (0%) ![]() ![]() |
Kod $sql="SELECT newsy.id, DATE_FORMAT(newsy.dodano, '%e-%m-%Y %H:%i') AS utworzono,
newsy.autor, newsy.tresc, newsy.temat , newsy.cat , COUNT(lp) AS il_kom FROM newsy LEFT JOIN komentarze ON (komentarze.id=newsy.id) WHERE newsy.cat = ".$_GET['cat']." GROUP BY newsy.id ORDER BY newsy.dodano DESC"; $query= $db->query($sql); while($result=mysql_fetch_assoc($query)) { $p.='<h2><a href="'.$http_dir.'Comments?newsid='.$result['id'].'">'.$result['temat'].'</a></h2> <p class="post-by">Dodał: <a href="'.$http_dir.'Profiles/'.$result['autor'].'">'.$result['autor'].'</a> ,<a href="'.$http_dir.'Categories/'.$result['cat'].'">'.$result['cat'].'</a></p> <p>'.nl2br($result['tresc']).'</p> <p class="post-footer align-left"> <a href="index.html" class="readmore">Czytaj dalej</a> | <a href="'.$http_dir.'Comments?newsid='.$result['id'].'" class="comments">Komentarze '.$result['il_kom'].'</a> | <span class="date">'.$result['utworzono'].'</span> </p>'; } Ten post edytował devil-war 8.08.2008, 19:20:36 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 5.10.2025 - 08:21 |