VbzCart/docs/queries/qryOrders Active

From Woozle Writes Code
< VbzCart‎ | docs‎ | queries
Revision as of 21:08, 3 December 2008 by imported>Woozle (New page: ==Details== * '''Returns''': all orders which are currently active. For now, this just shows orders which haven't been pulled , but later it will look at the order state. As simple as it i...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Details

  • Returns: all orders which are currently active. For now, this just shows orders which haven't been pulled , but later it will look at the order state. As simple as it is, it's still useful to have this as a separate query because:
    • Removing unneeded records before sending data helps to reduce bandwidth a little bit when called from a remote process
    • Serves as a reference which can be used unaltered even after the method of determining whether an order is "active" changes
  • Requires: Template:Vbzcart/table
  • History:
    • 2008-11-20 Added requirement that WhenClosed (new field) must also be NULL

SQL

<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryOrders_Active AS SELECT * FROM core_orders WHERE

 (ID_Pull IS NULL) AND
 (WhenClosed IS NULL);</mysql>

<section end=sql />