Skip to content

first commit#23

Open
coopsmit26 wants to merge 2 commits intocode-differently:mainfrom
coopsmit26:main
Open

first commit#23
coopsmit26 wants to merge 2 commits intocode-differently:mainfrom
coopsmit26:main

Conversation

@coopsmit26
Copy link
Copy Markdown

No description provided.

@kburd kburd self-requested a review March 15, 2021 18:17

CREATE DATABASE Pokemon;

CREATE TABLE Pokemon (
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.

Schema looks good, only suggestion is to name your database or table something different. You don't want them to share the name pokemon

let name = "Pikachu"
let img = "myurl2";

console.log(`INSERT INTO pokemon(id, name, img) VALUES (${id}, ${name}, ${img});`)
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.

Great start, you are generating sql statements correctly. The next step is to use con.query to run the statements in the database

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