int(1) int(1) int(200) int(1) int(2) int(200) int(1) int(3) int(200) int(1) int(4) int(200) int(1) int(5) int(200) int(2) int(1) int(200) int(2) int(2) int(200) int(2) int(3) int(200) int(2) int(4) int(200) int(2) int(5) int(200) int(3) int(1) int(200) int(3) int(2) int(200) int(3) int(3) int(200) int(3) int(4) int(200) int(3) int(5) int(200) int(4) int(1) int(200) int(4) int(2) int(200) int(4) int(3) int(200) int(4) int(4) int(200) int(4) int(5) int(200) int(5) int(1) int(200) int(5) int(2) int(200) int(5) int(3) int(200) int(5) int(4) int(200) int(5) int(5) int(200) int(12) int(1) int(200) int(12) int(2) int(200) int(12) int(3) int(200) int(12) int(4) int(200) int(12) int(5) int(200) product_prices; +------------------+----------------------------+------+-----+---------------------+-------------------------------+ | Field | Type | Null | Key | Default | Extra | +------------------+----------------------------+------+-----+---------------------+-------------------------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | product_id | int(11) | NO | MUL | NULL | | | truck_id | int(11) | YES | | NULL | | | per_trip_price | decimal(10,2) | NO | | 0.00 | | | per_ton_price | float(10,2) | NO | | 0.00 | | | status | enum('current','obsolete') | NO | | current | | | price_set_at | datetime | NO | | current_timestamp() | | | price_changed_at | datetime | YES | | current_timestamp() | on update current_timestamp() | +------------------+----------------------------+------+-----+---------------------+-------------------------------+ productTable; +-----------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------+--------------+------+-----+---------+----------------+ | productId | int(11) | NO | PRI | NULL | auto_increment | | product | varchar(255) | NO | | NULL | | +-----------+--------------+------+-----+---------+----------------+ productTable; +-----------+-------------------+---------------+ | productId | product | pricing_model | +-----------+-------------------+---------------+ | 1 | Shap Sand fine | trip | | 2 | Shap Sand coarse | trip | | 3 | Plaster Sand | trip | | 4 | Top Soil | trip | | 5 | Laterite | trip | | 6 | Stone Dust Dust 1 | ton | | 7 | Stone Dust Dust 2 | ton | | 8 | Gavel 3/4inch | ton | | 9 | Gavel 1/2inch | ton | | 10 | Gavel 1inch | ton | | 11 | Gavel 2inch | ton | | 12 | Hardcore/Boulders | trip | +-----------+-------------------+---------------+ truckCategoryTable; +--------------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------------+-------------+------+-----+---------+----------------+ | truckNamType | varchar(50) | NO | | NULL | | | truckNumberOfTyres | varchar(50) | NO | | NULL | | | truckCapacity | varchar(50) | NO | | NULL | | | TruckCategoryID | int(11) | NO | PRI | NULL | auto_increment | +--------------------+-------------+------+-----+---------+----------------+