D
Deleted member 622421
Guest
Error
SQL query:
CREATE TABLE `orderdetails` (
`order_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL DEFAULT '0',
`order_name` varchar(1000) NOT NULL DEFAULT '',
`order_price` double NOT NULL DEFAULT '0',
`order_quantity` int(10) unsigned NOT NULL DEFAULT '0',
`order_total` double NOT NULL DEFAULT '0',
`order_status` varchar(45) NOT NULL DEFAULT '',
`order_date` date NOT NULL DEFAULT '0000-00-00',
PRIMARY KEY (`order_id`),
KEY `FK_orderdetails_1` (`user_id`),
CONSTRAINT `FK_orderdetails_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=latin1
MySQL said: You do not have permission to view the full content of this post. Log in or register now.
#1005 - Can't create table `edgedata`.`orderdetails` (errno: 150 "Foreign key constraint is incorrectly formed") (You do not have permission to view the full content of this post. Log in or register now.)
mga sir help po , yan po naging error nung nag'import po ako ng database sa xampp/mysql...
SQL query:
CREATE TABLE `orderdetails` (
`order_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL DEFAULT '0',
`order_name` varchar(1000) NOT NULL DEFAULT '',
`order_price` double NOT NULL DEFAULT '0',
`order_quantity` int(10) unsigned NOT NULL DEFAULT '0',
`order_total` double NOT NULL DEFAULT '0',
`order_status` varchar(45) NOT NULL DEFAULT '',
`order_date` date NOT NULL DEFAULT '0000-00-00',
PRIMARY KEY (`order_id`),
KEY `FK_orderdetails_1` (`user_id`),
CONSTRAINT `FK_orderdetails_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=latin1
MySQL said: You do not have permission to view the full content of this post. Log in or register now.
#1005 - Can't create table `edgedata`.`orderdetails` (errno: 150 "Foreign key constraint is incorrectly formed") (You do not have permission to view the full content of this post. Log in or register now.)
mga sir help po , yan po naging error nung nag'import po ako ng database sa xampp/mysql...