Skip to content

successfully connected with database#11

Open
hinalatif25 wants to merge 3 commits intocode-differently:mainfrom
hinalatif25:main
Open

successfully connected with database#11
hinalatif25 wants to merge 3 commits intocode-differently:mainfrom
hinalatif25:main

Conversation

@hinalatif25
Copy link
Copy Markdown

No description provided.

@kburd kburd self-requested a review March 1, 2021 22:17
Copy link
Copy Markdown
Contributor

@kburd kburd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! The next step is to fill the database with data

ALTER TABLE pokemon_type ADD FOREIGN KEY(pokemon_id) REFERENCES pokemon(pokemon_id);
ALTER TABLE pokemon_type ADD FOREIGN KEY(type_id) REFERENCES types(type_id);

INSERT INTO pokemon (pokemon_id, name)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We generally don't include insertions in the schema, just table and database creations

})


async function getCustomerData(){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are pulling pokemon data but the function is getCustomerData. It's good practice to keep function names and logic in sync


let con = mysql.createConnection ({

password: "United@2011@",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotta change your password :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants