Location: PHPKode > scripts > WH Social > wh_social/admin/handler/newest.php
<?php

    $sql = "SELECT id, name, date, status FROM members ORDER BY date DESC LIMIT 6";
	$result = mysql_query($sql) OR die(mysql_error());

	if(!$result) {

	echo '<p class="false">' . $lang['no_members'] . '</p>' . mysql_error();

	   }else{

		if(intval(mysql_num_rows($result)) == 0) {

		echo '<p class="false">' . $lang['no_members'] . '</p>' . mysql_error();

    }else{

	while($row = mysql_fetch_assoc($result)) {

		echo '<p><a href="../member.php?id=' . (int)$row['id'] . '" target="_blank">' . htmlentities($row['name'], ENT_QUOTES) . '</a><br>';
		echo '<small>' . date('d.m.Y - H:i', strtotime($row['status'])) . ' ' . $lang['o_clock'] . '</small></p>';
		}

	mysql_free_result($result);
	}
    }

?>
Return current item: WH Social