-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql showing error #1
Comments
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. |
yes where is that ? so confusing for the beginners ~ |
I learn a lot about php and mysql . |
Thanks for Answering me i solve this problem and learn alot about php |
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
) REFERENCESproducts
(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…)The text was updated successfully, but these errors were encountered: