hi there everyone,
I have two things I need to do. I need to find the 5 newest records and then the 5 records 30 days and older. I have the 5 newest:
// Build the last 5 lists: newest
$query = "SELECT *, DATE_format(join_time, '%b %e, %Y') as join_time, DATE_format(join_time, '%Y-%m-%d %k:%i:%s') as join_sort FROM addon_guild_members WHERE active=1 ORDER BY join_sort DESC LIMIT 0, 5";
$result = mysql_query ($query) or die('MySQL error: ' . mysql_error() . '<hr/>' . $query);
$result_rows = mysql_num_rows($result);
if($result_rows!=0){
$result = mysql_query ($query);
while ($row = mysql_fetch_assoc ($result)) {
$name = stripslashes($row['name']);
$standing = standing_text($row['rep_guild_standing']);
echo($name." (to ".$standing.")<br />");
}
}
but I'm having some problems figuring out how to modify this to reflect the 5 records 30 days and older.
Any help on the matter would be greatly appreciated!