Dear all,
I am new in this forum. This is my code
$query = "
SELECT webdb.id, webdb.writer, writer.picLoc, webdb.title FROM webdb, writer WHERE webdb.writer=writer.name and
category = 'Researchworks' and language = 'Farsi' ORDER BY writer DESC";
$resultaat = mysql_query($query, $LinkID);
$column_count = mysql_num_fields($resultaat) or die (mysql_error()."<br>Couldn't execute query: $SQLquery");
$counter=1;
echo "<table border=\"0\" width=\"700\" border color=white><tr>";
while ($row = mysql_fetch_row($resultaat))
{
if ($author !== $row[1])
{
$author = $row[1];
echo "<td align=right width=220 valign=top style=\"margin: 5px; float: right border-bottom-color:#000; border-left-color:#000;\">";
echo "<img width=\"50\" height=\"80\" src=\"admin/writers/$row[2]\" border =\"0\"><br>".$row[1]."<br>";
echo "<a href=\"poems.php?writer=$row[1]\">".$row[3]."</a><br>";
echo "</td>";
if($counter%3==0)
{
echo"</tr><tr>";
}
$counter++;
}
}
echo"</tr></table>";
i have authors with different articles on a certain topic. What i want is, displaying the name of the author only once and all his titles under his name. I also want a dynamic table where i display three authors in each row and soon as there a fourth author a new row must start. My problem now is is the title is also being filtered and i can only display one title.
Thanks in advance