Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Integrating PHP with Databases Using Relational Tables Understanding SQL Injections

Anyone else having trouble following/grasping these videos?

So far, I am having a bit of trouble following these videos. I did the Beginning PHP and didn't have much trouble. I don't consider myself a genius, but I'm not dumb either, yet I constantly feel stupid. Anyone else going through this? Any tips?

What exactly are you having trouble with? You've gone through quite a few JavaScript and Python videos. Are the PHP videos different in some way? Are you having trouble understanding SQL injection?

Hey Michael,

Someone posted to do this course first before continuing with intermediate php and it definitely helps bridge the gap:

https://teamtreehouse.com/library/querying-relational-databases

I've also had trouble following Beginning PHP & these videos as well and this approach so far has somewhat helped:

1) watch the video first, then watch it again while following along 2) slow down the video 3) read the transcript of the video 4) check out the comments and look for another explanation

Treehouse also has a course on how to learn with 3 questions to ask yourself as you cover material which help make sure that you know if you know something: 1) What are the main concepts/ideas/facts I just learned? 2) Can I explain them in my own words? 3) Can I relate them to things I already know?

Repetition is like a bulldozer to any problem so keep on truckin!

JP, that's a really great answer, thanks. I am going to take your advice. I planned on finishing the SQL track after completing the Intermediate PHP track but it might have been useful to do it before.

I think part of what makes these courses hard to follow is the programming style, which is procedural. The code, by definition, has no containers...it just floats freely in the html. I think Alena tried to keep it as organized as possible but at the end of the day, writing procedural code is only appropriate for the smallest of projects and taking an object-oriented approach would introduce a lot more organization and make things easier to follow. With other languages like Java and C++ for instance they would always start teaching OOP right from the start but but with scripting languages they don't. There are pros and cons to both approaches. I think a huge con of writing medium-size projects like the Media Library project procedurally is that the project will be super messy even if you attempt to force organization on it.

I will do that course on how to learn. I might not have the best strategy.

2 Answers

Yes. It's ridiculous! They don't even show the data in the databases, so for me, who's using MySQL and PHPMyAdmin I can't follow it at all. I originally put all the data into one table just to get my data to work in the first place and now she's saying I actually need a bunch of different tables and need to relate them together? Okay YOU COULD HAVE TOLD ME THAT EARLIER. And relational databases aren't a pre requisite for this courSE??? It definitely should be, that last challenge was ridiculous I just had to google the answer. Not that this comment is gonna change anything these videos are over 3 years old and they're not gonna change them now are they. WHAT AM I PAYING £20 A MONTH FOR????????

Hey Josh, I think the courses on Lynda.com/LinkedIn Learning are better. Hopefully my comment doesnt get deleted for saying that lol. I had to figure out a lot of things on my own which I guess is to be expected when learning to code but at the same time these videos skip over a lot of things that are really critical in my opinion. It's just as bad or worse when you try to the object-oriented php courses. Things are brushed over very quickly and without enough theory, so I was left totally confused about a lot of things and had to do a lot of independent reading to get a better understanding. My advice is keep on pushing through. Even though a lot of people dont like it, PHP is a great and very modern language for backend development and it supports a lot of great features that you will love once you start writing object-oriented MVC applications. Just dont fully rely on Treehouse or else you will miss important stuff.

Also I recommend spending lots of time with the SQL courses on Treehouse. Then you will have enough understanding to just look up SQL keywords and understand how to use them. None of the PHP courses EVER teach you how to make a database seed file so I learned it on my own from W3 Schools. You create a file with the .sql extension and in the file you use the CREATE DATABASE command and the CREATE TABLE command to create tables in the database. From there you name them and specify their data types. I recommend reading the stuff on W3 schools for that because it's very straight forward.

Thanks Michael for your response! I actually love PHP i really enjoying coding on my own with it but trying to follow these videos just got to me after a while with how badly they're done, especially considering we're literally paying £20 a month to watch them and there's way better stuff online for free. But i'll stick with it and just saturate my learning with other better (free) websites haha

Treehouse does have something to offer. It must, since the courses on PHP took me from knowing basically nothing about backend web development to programming mvc apps using a framework, custom database and modern techniques. You just have to supplement like you said. One thing is that the object oriented courses barely touch the subject of object-oriented design. You will find that once you start writing your programs in terms of modular objects, there is literally a million different ways you can do things and its hard to know how the best way to actually do it. Treehouse has a course on design patterns but it's extremely general and unhelpful. Lynda.com has a lot of courses on design patterns, including one specifically for PHP.