Hello there,
i am new to php, i try to draw out the solved topics from the SMF database, but i don't know how to make a link to the topic subject. Here is the code:
global $settings, $txt;
$result = mysql_query(" SELECT *
FROM `smf_topics` AS t
INNER JOIN smf_messages AS m ON ( m.id_msg = t.id_first_msg )
LEFT JOIN smf_members AS mem ON ( mem.id_member = m.id_member )
WHERE `is_solved` = '1'
ORDER BY poster_time DESC
LIMIT 4 ");
while($row = mysql_fetch_array($result))
{
echo '<img src="', $settings['images_url'], '/post/topicsolved.gif', '" />'. $row['subject']. " author: " . $row['real_name'] . " replies: " . $row['num_replies'] . "read: " . $row['num_views'] . " <br /><br />" .$row['body']. "<br /><br /><hr>";
}
what i want is a link to the $row['subject'], so the when the topic subject is clicked it goes to that topic to the newest message. Can anybody here that is so kind to give me a hand? Many thanks in advance.
PS: i forget another thing which could be nice is to trim the $row['body'] to 128 words. Thanks.