But now i need "WHERE author ='$author'" there aswell to display on that news, the number of news that the author of the news has written.
$query = "SELECT COUNT(rubrik) FROM news_table WHERE author ='$author'";
$result = mysql_query("SELECT * FROM communitynews WHERE id='$id' ") or die(mysql_error());
while($row = mysql_fetch_array( $result ))
{
echo "<div id='news'><div id='news-info'><div style='margin-top:20px;margin-left:10px;'>Användare: ";
echo $row['author'];
echo " <img src='images/country/";
echo $row['locate'];
echo ".gif'>";
echo "<br /> Nyheter:".$row['COUNT(rubrik)']."</div></div><div style='float:left;margin-left:10px;margin-top:15px;'><b>";
echo $row['rubrik'];
echo "</b> skrivet av <b><i>";
echo $row['author'];
echo "</i></b> den <i>";
echo $row['date'];
echo "</i><br /><i>Kategori: ";
echo $row['cat'];
echo "</i><br />";
echo $row['content'];
echo "<br /><a class='read' href='?id=";
echo $row['id'];
echo "'></a>
<a href='?edit=";
echo $row['id'];
echo "'>Ändra</a> <a href='?delete=";
echo $row['id'];
echo "'>Ta bort</a>
</div>
</div>";
I've no idea on how to do this :S
