VbzCart/queries/qryItems needed forStock

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< VbzCart‎ | queries
Revision as of 00:45, 3 January 2010 by Woozle (talk | contribs) (Created page with '==About== * '''History''': ** '''2010-01-02''' Created * '''Used by''': VbzAdminStkItems::Needed() - restock request creation in VbzAdmin * '''Requires''': {{vbzcart/query|qryStk…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • History:
    • 2010-01-02 Created
  • Used by: VbzAdminStkItems::Needed() - restock request creation in VbzAdmin
  • Requires:
  1. REDIRECT Template:l/vc/query

SQL

<mysql>CREATE OR REPLACE VIEW qryItems_needed_forStock AS SELECT

 i.ID,
 i.QtyMin_Stk,
 s.QtyForSale

FROM cat_items AS i

 LEFT JOIN qryStkItms_for_sale AS s
 ON s.ID_Item=i.ID

WHERE i.isForSale AND ((i.QtyMin_Stk - s.QtyForSale) > 0);</mysql>