MrTV
asked on
php mysql stock deduction
when user order a pro duct I prepaire the order like the picture below but how can i deduct the product from ' product ' table
if some item order more than I have on stock i must let user correct the quantity that they want until it fit my stock that i have
Please suggest php or sqlstate ment
if some item order more than I have on stock i must let user correct the quantity that they want until it fit my stock that i have
Please suggest php or sqlstate ment
CREATE TABLE IF NOT EXISTS `product` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ProductId` varchar(80) DEFAULT NULL,
`ProductName` varchar(255) DEFAULT NULL,
`ProductType` varchar(255) DEFAULT NULL,
`ProductPrice` varchar(255) DEFAULT NULL,
`ProductQuantity` varchar(255) DEFAULT NULL,
`DateTime` datetime DEFAULT NULL,
`TimeStamp` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `ProductId` (`ProductId`),
KEY `ProductId_2` (`ProductId`),
KEY `ProductName` (`ProductName`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
new.JPG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for the points!