inventory-manager icon indicating copy to clipboard operation
inventory-manager copied to clipboard

sql showing error

Open Behramand opened this issue 8 years ago • 6 comments

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…)

Behramand avatar Feb 09 '18 03:02 Behramand

where i can download the InventoryManager.sql file?

cilinbilly avatar Feb 09 '18 17:02 cilinbilly

fix the sql problem thankyou ...

Behramand avatar Feb 10 '18 09:02 Behramand

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.

nsandison avatar Mar 23 '18 11:03 nsandison

where i can download the InventoryManager.sql file?

yes where is that ? so confusing for the beginners ~

kazudv avatar Feb 19 '19 07:02 kazudv

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

Behramand avatar Feb 19 '19 10:02 Behramand

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

Behramand avatar Feb 19 '19 10:02 Behramand