kaushikbhat07 / restaurant-order-website

This is a student project which depicts an online food ordering system for a restaurant. Developed from scratch using PHP.
http://swadesh.epizy.com/swadesh
8 stars 3 forks source link

database issue #6

Closed hawk7476 closed 2 years ago

hawk7476 commented 3 years ago

As I import db file it shows.please tell me which db file should i select? SQL query:

CREATE TABLE admin ( admin_id int(10) NOT NULL AUTO_INCREMENT, first_name varchar(30) NOT NULL, last_name varchar(30) NOT NULL, email varchar(96) NOT NULL, PRIMARY KEY (admin_id), KEY ADMIN_EMAIL_FK (email), CONSTRAINT ADMIN_EMAIL_FK FOREIGN KEY (email) REFERENCES login_info (email) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=251 DEFAULT CHARSET=latin1 MySQL said: Documentation

1215 - Cannot add foreign key constraint

kaushikbhat07 commented 3 years ago

Use this file: swadesh - Lame Data Set (Schema Included).sql located under Database File directory. Try dropping the database, create a new database and import the sql file.