Hi all, im using the following scripts:

<?php
include("connect.php");

$query = "SELECT threadid, title, postusername FROM thread order by threadid
DESC LIMIT 0,5";
$result = mysql_db_query ("vbdforum", $query);

if ($result){
  echo "<table width=\"100%\">";

  $numOfRows = mysql_num_rows ($result);
  for ($i = 0; $i < $numOfRows; $i++){
    $threadid = mysql_result ($result, $i, "threadid");
    $posts = mysql_result ($result, $i, "title");
    $postusername = mysql_result ($result, $i, "postusername");
 echo "<tr><td width=\"50%\"><a
href=_forum/showthread.php?threadid=$threadid
target=&quot;_blank&quot;>$posts</a></td><td
width=\"50%\">$postusername</td></tr>";
  }
  echo "</table>";
  }
  else{
    echo mysql_errno().": ".mysql_error()."<BR>";
  }

mysql_close ();

?>

Everything works perfect, but it prints out 6 lines, cause there are 6 lines
it grabbed from the source. What I want to do is print only 5 lines, cause
that would look a lot better in my page lay-out. Can someone give me a hint?

THx
H0RNET

ps, can u also tell me if I posted this in the right newsgroup?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to