add

Saturday, May 4, 2013

2013 may 05 : starting to learn php

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
  1. downloaded netbean
  2. downloaded jdk and installed
  3. downloaded wamp and installed
 9:00 PM => started database connectivity through mysql jdbc in netbeans .
  1. created table of wishers
  2. created table of wishes
  3. inserted data in tables
  4. created simple form and posted its value on next page
 ERROR : I had the following errors

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)
)
  1. 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
10:00 PM

No comments:

Post a Comment