Jump to content
php.lv forumi

Recommended Posts

Posted (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 by RaitisRR
Posted

<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 ?

×
×
  • Create New...