RaitisRR Posted January 24, 2007 Report Share Posted January 24, 2007 (edited) sveiki esmu ticis gala ar to ka izvilkt no datubazes bet kaa lai uztaisa lai izvilktais teksts ir ka links uz ierakstu ? piem: <table width="100%" border="0"> <?php $result = mysql_query("SELECT * FROM phpbb_posts_text"); while ($row = mysql_fetch_assoc($result)) { ?> <tr><td><b><a href="/phpBB2/viewforum.php?f=(TE VAJAG IZVILKT POSTA ID)"><?php echo $row['post_subject']; ?></a></b></td></tr> <?php } ?> </table> post id glabajas tabulaa - post_id ceru ka kadz ko lidzigu ir darijis un vares paliidzet varbuut ir kadz ieteikums ka lai savaadak taisa ? Edited January 24, 2007 by RaitisRR Link to comment Share on other sites More sharing options...
RaitisRR Posted January 24, 2007 Author Report Share Posted January 24, 2007 <table width="100%" border="0"> <?php $result = mysql_query("SELECT * FROM phpbb_posts_text"); while ($row = mysql_fetch_assoc($result)) { ?> <tr><td><b><a href="/phpBB2/viewtopic.php?t=<?php echo $row['post_id']; ?>"><?php echo $row['post_subject']; ?></a></b></td></tr> <?php } ?> </table> Shita to daiit butu pareiiz ? Link to comment Share on other sites More sharing options...
RaitisRR Posted January 24, 2007 Author Report Share Posted January 24, 2007 Ka lai uztaisa taa lai piem pec 20 rakstiem partrauc izdrukashanu ? un ka panakt lai izdruka tik jaunaakos postus (shkiro pec datuma ?) Link to comment Share on other sites More sharing options...
andrisp Posted January 24, 2007 Report Share Posted January 24, 2007 ...ORDER BY datums DESC LIMIT 0, 20 Link to comment Share on other sites More sharing options...
Hamlets Posted January 24, 2007 Report Share Posted January 24, 2007 $result = mysql_query("SELECT * FROM phpbb_posts_text ORDER BY `post_id` DESC LIMIT 20 "); Link to comment Share on other sites More sharing options...
RaitisRR Posted January 24, 2007 Author Report Share Posted January 24, 2007 TNX Link to comment Share on other sites More sharing options...
Recommended Posts