RaitisRR Posted January 24, 2007 Report 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
RaitisRR Posted January 24, 2007 Author Report 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 ?
RaitisRR Posted January 24, 2007 Author Report 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 ?)
Hamlets Posted January 24, 2007 Report Posted January 24, 2007 $result = mysql_query("SELECT * FROM phpbb_posts_text ORDER BY `post_id` DESC LIMIT 20 ");
Recommended Posts