8:00 PM => I started learning php from a tutorial of netbeans.link of the tutorial is https://netbeans.org/kb/docs/php/wish-list-lesson2.html.
here i learnt the following
CREATE TABLE wishes2(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
wisher_id INT NOT NULL,
description CHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
due_date DATE,
FOREIGN KEY (wisher_id) REFERENCES wishers2(id)
)
here i learnt the following
- downloaded netbean
- downloaded jdk and installed
- downloaded wamp and installed
- created table of wishers
- created table of wishes
- inserted data in tables
- created simple form and posted its value on next page
CREATE TABLE wishes2(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
wisher_id INT NOT NULL,
description CHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
due_date DATE,
FOREIGN KEY (wisher_id) REFERENCES wishers2(id)
)
- Error code 1005, SQL state HY000: Can't create table 'saqi.wishes2' (errno: 150)
Line 1, column 1
- Solution : error was becuase i did not create the parent table for which i was creating a foreign key and wishers2 table
No comments:
Post a Comment