Jump to content
php.lv forumi

Ka lai no db izvelk tabulaa


RaitisRR

Recommended Posts

Sveiki man kibelite isti neprotu no db kko izvilkt tabulaa luk kur izvelu no db -

 

<?php

$result = mysql_query("SELECT * FROM phpbb_forums");

while ($row = mysql_fetch_assoc($result))

{

echo $row['forum_name'];

echo $row['forum_desc'];

}

mysql_close($con)

?>

 

bet man vajg to izvadiit shadaa tabulaa -

<table width="100%" border="0">

<tr><td>forum_name</td></tr>

<tr><td>forum_desc</td></tr>

</table>

Link to comment
Share on other sites

Saliec kopā visu:

 

<table width="100%" border="0">
<?php
$result = mysql_query("SELECT * FROM phpbb_forums");
while ($row = mysql_fetch_assoc($result)) { ?>
<tr><td><?php echo $row['forum_name']; ?></td></tr>
<tr><td><?php echo $row['forum_desc']; ?></td></tr>
<?php }
mysql_close($con)
?>
</table

Link to comment
Share on other sites

×
×
  • Create New...