Difference between revisions of "VbzCart/queries"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(→‎Catalog Sources: two queries not in use)
(→‎Catalog: qryCat_Titles_Item_count)
Line 21: Line 21:
 
* [[/qryItTypsDepts_ItTyps]]
 
* [[/qryItTypsDepts_ItTyps]]
 
* [[/qryCat_Titles]]
 
* [[/qryCat_Titles]]
* [[/qryCat_Titles_Item_stats]]
+
* [[/qryCat_Titles_Item_stats]] -- item/stock statistics
 +
* [[/qryCat_Titles_Item_count]] -- simpler query for maintenance
 
* [[/qryCat_Titles_web]]
 
* [[/qryCat_Titles_web]]
 
* [[/qryCbx_Titles]]
 
* [[/qryCbx_Titles]]

Revision as of 22:42, 11 November 2010

Navigation

VbzCart: data views

Overview

What MS Access calls "queries" are called "views" in MySQL, i.e. they pull data from existing tables and are themselves usable as data sources in much the same way that tables are (and in which result sets from functions are not).

Some common prefixes:

  • qryCbx_: queries used for filling comboboxes. The unique ID will always be the first field, and the text to display will always be the second field; additional fields may be provided for use in further qryCbx_ queries which show a subset of the results.
  • qryCat_: queries which build catalog numbers or information by joining multiple tables. (In Access, the convention was qryCatNum_.)

by category

Inactive

Catalog

Catalog Items

Catalog Sources

Ordering

Carts

Customers

Orders

Packages

Restocks

terminology

  • Active = not "terminated", i.e. not "closed", "killed", or "orphaned" (may or may not be "expected" yet)
  • Closed = received from supplier, nothing remaining on backorder
  • Expected = placed with supplier, but not yet received
  • Killed = canceled with supplier after having been placed
  • Orphaned = we don't have records that anything was received, but nothing further is expected (usually old data)
  • Terminated = closed, orphaned, or killed
  • Unsent = created but not yet placed with supplier, i.e. not "expected"

phases:

Time →
Created (Unsent) Ordered (Expected) Closed, Killed, or Orphaned
--(Active)-- --(Terminated/Inactive)--

Shipping

Stock

new queries

  1. REDIRECT Template:l/vc/table queries:

old queries

This was the first batch of queries I created, before I had decided to go with the qry prefix as in Access.

Caching

Caching should only be used for catalog display.