To begin, we'll need a way to view the products available and also allow the option to select and view any one of those products.
In this recipe, we'll create a listing of products as well as a page where we can view the details of a single product.
To go through this recipe, we'll first need a table of data to work with. So, create a table named
products using the following SQL statement:
CREATE TABLE products ( id VARCHAR(36) NOT NULL, name VARCHAR(100), details TEXT, available TINYINT(1) UNSIGNED DEFAULT 1, created DATETIME, modified DATETIME, PRIMARY KEY(id) );
We'll then need some sample data to test with, so now run this SQL statement to insert some products:
INSERT INTO products (id, name, details, available, ...