Guest Posted May 22, 2003 Posted May 22, 2003 can someone please send me the SQL for getting the email address of the last 10 clients to sign up
wizardsandwars Posted May 22, 2003 Posted May 22, 2003 Well, if you are using phpmyadmin, just do this... SELECT max(customers_id) from customers Then take that number and do this SELECT customers_email_address FROM customers WHERE customers_id < (the number - 10) ------------------------------------------------------------------------------------------------------------------------- NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit. If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.
dreamscape Posted May 22, 2003 Posted May 22, 2003 this is how I would do it: SELECT customers_email_address FROM customers ORDER BY customers_id DESC LIMIT 10 but it seems like wizards code would be much faster, especially if you have a huge customer database... The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
Recommended Posts
Archived
This topic is now archived and is closed to further replies.