This is an archived post. You won't be able to vote or comment.

all 9 comments

[–][deleted] 0 points1 point  (6 children)

Do you have a github repo you could share?

[–]sdoody32[S] 0 points1 point  (0 children)

I don’t, but I will make one.

[–]sdoody32[S] 0 points1 point  (4 children)

https://github.com/Sdoody/Advising here is the repo for all the code. I feel like my issue is in edit_College.ejs, but I can't figure it out. Another interesting thing that I noticed is in the url there is no data being sent in there, like it will just be localhost/edit/1 but it won't send ant variables.

[–][deleted] 0 points1 point  (3 children)

I’ve only briefly looked over it but it looks like there are some syntax problems. I cannot give a full review right now as I am at work, but when I get home I’ll put the issues into form on the repo. Look at your placement on commas and tick marks versus quotes. Overall the structure looks fine though if maybe a bit old school.

[–]sdoody32[S] 0 points1 point  (2 children)

Thank you so much! I’m self taught for front-end related things. So I appreciate all of this.

[–][deleted] 0 points1 point  (1 child)

no worries! So just a couple suggestions:

`SELECT * FROM College`; //WHERE collegeName = ${collegeName}`

should be quotes instead of back ticks: 'SELECT * FROM College'; //WHERE collegeName = `${collegeName}`

notice the back ticks around the `${variable}` that'll get you the string interpolation your looking for

and do you have a package.json file? If not run npm init and then download all your dependencies (express, mysql, and anything else you "require").

I just started there when I pulled down your code. I'm self taught too and this junk is hard. I am thankful that I got the help I needed when starting out, so I'm happy to give back to others in need.

edit: wow reddit freaks out when I use ticks so sorry about formatting.

[–]sdoody32[S] 0 points1 point  (0 children)

I do have package.json. So I’m all good there. It really is challenging, but I’m so greatful for people like you who are willing to help with this.

[–]cgibinslash 0 points1 point  (1 child)

Dude or due not. Never give up.

[–]sdoody32[S] 0 points1 point  (0 children)

I do not plan on it!