Although
Add
, Update
, and Delete
are necessary operations, we'll come to these in the later chapter, so we can leave it out at this time.
Here we are preparing the SQL code to pull information about customers later on:
SELECT customers.id, customers.name, customers.addr1, customers.addr2, customers.city, customers.state, customers.zip, customers.country, customers.phone, customers.fax FROM customers WHERE customers.status = 1;
Next comes the code for selecting the Quotation
lists. This is similar to what we saw for the customer information list. For the code, please refer to the source file under 11_s
electing_quotation_list.sql
.
The code for items will select the quotation items from the database. This will pick up items where quotations.status
is 1
and quotation.parent
is 1
:
SELECT quotations.description, quotations.qty, quotations.price, quotations.sum FROM quotations WHERE quotations.'status' = 1 AND quotations.parent = 1
As this is similar to Customers
, you can again leave out Add
, Update
, and Delete
for now.