Pentiums Posted February 27, 2008 Report Share Posted February 27, 2008 (edited) $kat = $_GET['kat']; $zinas = dbquery("SELECT * FROM www_news WHERE news_cat='".$kat."' ORDER BY news_id DESC LIMIT 50"); while($data = dbarray($zinas)) { echo stripslashes('<a href="'.$www.'?lasit='.$data['news_id'].'">'.$data['news_subject'].'</a><br>'); } Šis ir jaunumu / rakstu / apskatu un citu lietu arhīva lapas skripts, lieta tāda, ka izveidoju, ka var skatīties pa kategorijām piemēram index.php?kat=17 utt... bet kā dabūt gatavu, lai parāda visu pēc kārtas ieejo vienkārši index.php bez nekādiem ?kat= ???? lai "itkā" nebūtu lietots tas WHERE Protams saglabājot kategoriju iespēju... Edited February 27, 2008 by Pentiums Link to comment Share on other sites More sharing options...
black Posted February 27, 2008 Report Share Posted February 27, 2008 1) Pārbaudi, vai ir padots mainīgais 'kat' 2) Ja ir, palaid esošo kveriju 3) Ja nav, palaid kveriju, kuram nav WHERE daļas Link to comment Share on other sites More sharing options...
Pentiums Posted February 27, 2008 Author Report Share Posted February 27, 2008 paldies.. :) Tā arī darīšu.. !! Link to comment Share on other sites More sharing options...
Recommended Posts