Jump to content
php.lv forumi

phpbb postu izvilkshan no db


RaitisRR

Recommended Posts

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 by RaitisRR
Link to comment
Share on other sites

<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

×
×
  • Create New...