In grade school I learned that the country I live in can be represented on a flat map. That doesn't mean there aren't any levels of knowledge above grade school.
w3schools does not portend to be the 'be all end all' of knowledge about the web or developing on the web. They're just another resource and they probably serve their intended purpose a very large number of the times.
Example code usually does not come with guarantees of correctness or even applicability to your problem. It just shows you the basics. It's the cut-and-paste mentality that causes such samples to be used in production code and that's a real problem, but that problem does not lie with the source of the information.
A MySQL lesson that shows you the basics is explicitly not going to go in to details like prepared statements, sql injection and prevention and so on.
Just like you don't teach physics to a kid that you're teaching to walk.
If you're using w3schools as a source for cut-and-paste examples or even best practices then you're doing it wrong, think of it as the 'grade school' of web development. Good enough to get your feet wet, not good enough to build an enterprise grade web application.
w3schools does not portend to be the 'be all end all' of knowledge about the web or developing on the web. They're just another resource and they probably serve their intended purpose a very large number of the times.
Example code usually does not come with guarantees of correctness or even applicability to your problem. It just shows you the basics. It's the cut-and-paste mentality that causes such samples to be used in production code and that's a real problem, but that problem does not lie with the source of the information.
A MySQL lesson that shows you the basics is explicitly not going to go in to details like prepared statements, sql injection and prevention and so on.
Just like you don't teach physics to a kid that you're teaching to walk.
If you're using w3schools as a source for cut-and-paste examples or even best practices then you're doing it wrong, think of it as the 'grade school' of web development. Good enough to get your feet wet, not good enough to build an enterprise grade web application.