sql showing error
Error SQL query:
CREATE TABLE orders (
id int(11) unsigned NOT NULL AUTO_INCREMENT,
Title varchar(255) DEFAULT NULL,
First varchar(255) DEFAULT NULL,
Middle varchar(255) DEFAULT NULL,
Last varchar(255) DEFAULT NULL,
ProductId int(11) unsigned NOT NULL,
NumberShipped int(11) DEFAULT NULL,
OrderDate date DEFAULT NULL,
PRIMARY KEY (id),
KEY order_product_fk (ProductId),
CONSTRAINT order_product_fk FOREIGN KEY (ProductId) REFERENCES products (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
MySQL said: Documentation
#1005 - Can't create table inventorymanager_2017-06-22.orders (errno: 150 "Foreign key constraint is incorrectly formed") (Details…)
where i can download the InventoryManager.sql file?
fix the sql problem thankyou ...
Error is due to script trying to create orders table without products table. Use products section of script first to create products table, then create orders and that works OK. Likewise, create suppliers before purchases for same reason. Doing that gave me the four tables with the data in them.
where i can download the InventoryManager.sql file?
yes where is that ? so confusing for the beginners ~
Error is due to script trying to create orders table without products table. Use products section of script first to create products table, then create orders and that works OK. Likewise, create suppliers before purchases for same reason. Doing that gave me the four tables with the data in them.
I learn a lot about php and mysql . Thanks for quick response
where i can download the InventoryManager.sql file?
yes where is that ? so confusing for the beginners ~
Thanks for Answering me i solve this problem and learn alot about php