Hey, how's it going? I'm very weak in my command of sql. How would I optimize the following...
PHP Code:

mysql_query("SELECT * FROM blogs ORDER BY id DESC LIMIT 0,20" );
$row mysql_fetch_array($firstquery)) {
$toomanyqueries mysql_fetch_array(mysql_query("SELECT * FROM members m, profiles p WHERE m.userid='$nurow[userid]' AND m.userid=p.userid" ));
"$toomanyqueries[a lot of different stuff...]";
Basically, I would like to combine the $firstquery and $toomanyqueries into 1 query. The script is for my weblogging site. Its function is to extract the last 20 members who posted an entry, then output some info about them. However, the info is in different tables and such. For the "profiles" and "members" tables, each member has only one row. However, for the "blogs" table, each weblog entry is entered as a new row. So, for this case, there will be many rows associated with a given member.

Thanks in advance! Let me know if what I've said is unclear and confusing (I tend to be that way.. heh).