хелп ми плз
код скрипта
Код: Выделить всё
<?php
mysql_connect( "127.0.0.1", " ", " ") or die("line2 - Could not connect to MySQL server!");
echo mysql_error();
mysql_select_db("bogus_forum") or die("line3 - Could not select products database!");
echo mysql_error();
$sql = 'SELECT djforum_posts.post_id, djforum_posts_text.post_text, djforum_posts.topic_id, djforum_topics.topic_title, djforum_posts.poster_id, djforum_users.username FROM djforum_posts, djforum_posts_text, djforum_topics, djforum_users WHERE djforum_posts_text.post_id = djforum_posts.post_id AND djforum_topics.topic_id = djforum_posts.topic_id AND djforum_users.user_id = djforum_posts.poster_id LIMIT 10';
$result = mysql_query($sql);
echo mysql_error();
$x = 1;
print "<table border=1 widht=100%>\n";
print "<tr>\n<th>post ID</th><th>post text</th>\n<th>topic ID</th><th>topic title</th>\n<th>poster ID</th><th>username</th>\n</tr>\n";
while ($x < mysql_num_rows($result)) :
$post_id = mysql_result($result, $x, 'post_id');
$post_text = mysql_result($result, $x, 'post_text');
$topic_id = mysql_result($result, $x, 'topic_id');
$topic_title = mysql_result($result, $x, 'topic_title');
$poster_id = mysql_result($result, $x, 'poster_id');
$username = mysql_result($result, $x, 'username');
print "<tr>\n";
print "<td>$post_id</td>\n<td>$post_text</td>\n<td>$topic_id</td>\n<td>$topic_title</td><td>$poster_id</td>\n<td>$username</td>\n";
print "</tr>\n";
$x++;
endwhile;
print "</table>";
mysql_close();
?>