Hi, Larry:
On page 170 when you define orders and order_contents you used "innoDB" engine as you indicated on page 172 InnoDB supports transaction. I downloaded your sql.sql file (inside ex2) a week or so ago and realized the "orders" and "order_contents" were defined as MyISAM
Here is copy/paste from your sql file
CREATE TABLE `orders` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`customer_id` int(10) unsigned NOT NULL,
`total` decimal(7,2) unsigned DEFAULT NULL,
`shipping` decimal(5,2) unsigned NOT NULL,
`credit_card_number` mediumint(4) unsigned NOT NULL,
`order_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `customer_id` (`customer_id`),
KEY `order_date` (`order_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `order_contents` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`order_id` int(10) unsigned NOT NULL,
`product_type` enum('coffee','other','sale') DEFAULT NULL,
`product_id` mediumint(8) unsigned NOT NULL,
`quantity` tinyint(3) unsigned NOT NULL,
`price_per` decimal(5,2) unsigned NOT NULL,
`ship_date` date DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `ship_date` (`ship_date`),
KEY `product_type` (`product_type`,`product_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Was it an error on the sql file or some updates I missed reading?
Thanks,
Brooke
Latest Sql.Sql Download File
Started by
zhaopeterson
, Oct 24 2011 2:03 AM
2 replies to this topic
#1
Posted 24 October 2011 - 2:03 AM
#2
Posted 29 October 2011 - 3:43 AM
This would help me out as well.
My thoughts on this is that the php is handling the transactions and the tables are handling the information storage so setting the ENGINE=MyISAM will work correctly.
(reading for PHP 6 & MySQL 5 ver3, and Effortless E-Commerce)
Todd
My thoughts on this is that the php is handling the transactions and the tables are handling the information storage so setting the ENGINE=MyISAM will work correctly.
(reading for PHP 6 & MySQL 5 ver3, and Effortless E-Commerce)
Todd
#3
Posted 3 November 2011 - 12:49 PM
Sorry about that. Yes, it should be InnoDB. I'll get it corrected in the downloads. Thanks for catching it!










