PDA

View Full Version : the last record....



Lucky13
May 31st, 2001, 19:37
I made a simple mailing list by saying:

$result = mysql_query("SELECT * FROM kod ORDER BY email",$db);
while ($myrow = mysql_fetch_array($result)) {
printf("%s, \n", $myrow["email"]);
}
What I'd like to know is how it knows what the last email address is, so it doesn't put a comma after it.

Thanks a lot!
~Lucky13

lucifer
May 31st, 2001, 20:11
add them after each entry and then cut off the last one

sounds more work but it's easier

Lucky13
May 31st, 2001, 20:32
ummmmmmm....what, now?