Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

email address of last 10 clients to sign up


Guest

Recommended Posts

Posted

can someone please send me the SQL for getting the email address of the last 10 clients to sign up

Posted

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.

Posted

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...