Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Showing products that have never been ordered?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pmarsh
Starting Member

United Kingdom
8 Posts

Posted - January 09 2006 :  08:58:02  Show Profile  Reply with Quote
Hi

I was wondering if there was a way of displaying products that had never been ordered?

I can't see any thing in the shop admin, and I'm not sure how to write a sql query to look up the products records and display only those which don't have a record in the oitems table.

Any help would be much appreciated!
Peter

devshb
Senior Member

United Kingdom
1904 Posts

Posted - January 09 2006 :  10:32:35  Show Profile  Visit devshb's Homepage  Reply with Quote
it depends on what kind of database you're using, but try this.....


select * from products as prd where not exists (select 1 from oitems as oit where prd.catalogid=oit.catalogid)

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
Go to Top of Page

pmarsh
Starting Member

United Kingdom
8 Posts

Posted - January 09 2006 :  17:55:31  Show Profile  Reply with Quote
I'm using SQL Server 2000.

Thanks for your reply, that query was just what I was looking for!

Peter
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00