-1
無論是產品表和產品形象表我已經使用這個刪除的連接查詢
DELETE p.* , pm.* FROM product p , productimage pm
WHERE p.p_id = '1' and pm.p_id = '1';
,但沒有結果
致謝CREATE TABLE IF NOT EXISTS `product` (
`p_id` int(10) NOT NULL AUTO_INCREMENT,
`p_names` varchar(50) NOT NULL,
`p_price` int(10) NOT NULL,
`p_description` varchar(100) NOT NULL,
PRIMARY KEY (`p_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;
CREATE TABLE IF NOT EXISTS `productimage` (
`pimage_id` int(10) NOT NULL AUTO_INCREMENT,
`img` varchar(100) NOT NULL,
`p_id` int(10) NOT NULL,----------------------------foreign Key
PRIMARY KEY (`pimage_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5
地段....因爲搜索2個小時 – 2015-04-05 15:11:04