FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


HomeWatched TopicsRegisterSearchDirectory
FAQMemberlistUsergroupsLog inStoresItemsBank
Google

Reply to topic Page 1 of 1
inner join
Message  

Reply with quote
Post inner join 
Hey

I want to check how many times a specific product has been ordered, how would I do this ?

Thanks

View user's profile Send private message

Reply with quote
Post  
do you have a column in your database that increment every time that product is ordered?

View user's profile Send private message Yahoo Messenger

Reply with quote
Post  
No it doesn't everytime the product is bought it adds it to a new line and adds a date

stamp with it, so the product is in the database lots of times but was bought on different

days. The only thing that is the same is the product id.

Thanks

View user's profile Send private message

Reply with quote
Post  
Here is a sample query. Change the attribute names and the id to yours

SELECT count(id) as mycount FROM orders WHERE product_id=13

Regards,
Pratamishus.


_________________
www.eb-downloads.com
FREE E-BOOKS DOWNLOADS.
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  



Google

FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


Web Design by PlatinumShore.com & Web Hosting by TradeWebHosting.com