Should I learn SQL or PHP first?

You can learn the basics of PHP in a few weeks on your own. It is regularly taught in a single semester of college. What about SQL? Depending on how well you can visualize the data, learning SQL can take weeks or years. I’d probably need to learn one of those flowchart tools to figure out the relations in a relational database. PHP is the backbone of the internet, or so I’ve heard. I know you can learn a lot because there are so many opportunities to use it. Basic SQL is easy. Stored procedures are supposedly hard. You could learn how to maintain and query databases with SQL. After you learn how databases and tables work, you can learn a web language like PHP.

Which one should I learn first, if I’m pressed for time?

PHP is harder to learn than SQL. If you are going to learn both, learn PHP first. You can build entire projects in PHP without ever using SQL. That would give me a lot of practice. But you can do a lot with PHP if you have a database. SQL and MySQL can do a lot with PHP, but you don’t have to know both. I heard you can pick up phpMyAdmin and SQL in an hour or two. That’s only their connection, not PHP and SQL’s peculiarities. But learning the ins and outs of SQL and PHP will take a long time without adding phpMyAdmin to the mix.

So I’ll start with PHP. I’ll have more opportunity to do something with it. And without possibly screwing up someone’s relational database before you’ve learned to restore it. And if I learn PHP, I can get paid to maintain sites while I learn how to use SQL. Or decide to learn MySQL instead. Or NoSQL. Not a chance; it isn’t mature enough to be practical.