I’m looking to make my own website in the next year or so… I am familiar with the basics of html, but I need this new site to be able to incorporate data from a database. I’ve been told the best thing for that is javascript… I just need to know how to teach myself the code.
You’ve been told a wrong information. Javascript can’t help to build a website that is able to incorporate data from a database.
PHP language and MySQL databases are what you are looking for. PHP is a server-side language, that is one whose code is meant to run on the server which holds the page content as well as the database. In the opposite, Javascript is a client-side language, which is run on the computer of the user viewing the content.
Good places to start learning PHP are w3schools.com and PHP Basics Tutorials on LearnPHP.org.
Also, you may be interested in this book:
Build Your Own Database Driven Website Using PHP & MySQL