chris webster wrote:
In case it's helpful, this thread also includes a fairly detailed discussion of the potential benefits of learning a DB like MySQL.
Of course, that discussion was started by Rahul as well.
MySQL is still very widely used, but a lot of those installations are just running websites using free open source software, so they don't really offer much in the way of commercial career prospects for developers. Not sure about the prospects for the enterprise version of MySQL. I can't really see why Oracle would want to invest too much in continuing to develop a serious alternative to their own commercial databases, after all. So learning MySQL is useful as an introduction to databases, and as a free tool for exploring other open source products. But if you want to sell your shiny new database skills, you'll probably need to learn a commercial database fairly quickly instead.
As for PHP, it is very widely used, pretty easy to pick up, but is kind of clunky and does not really support structured coding practices, unlike some other scripting languages such as Python etc. Of course, you can write good code in any language, but PHP makes it a little too easy to write bad code as well!
PHP does support OO, but it's more of an extension to the language rather than a built-in characteristic of the language (as in Python, Groovy etc). And if you want to try building your own web applications with PHP, I can strongly recommend using the free open-source Zend Framework components (see
this posting).
You need to ask yourself why you want to learn PHP. If you just want to learn a bit about developing web apps on the XAMP stack, then PHP/MySQL are a good combination to start with as they're easy to set up and there are lots of books etc on this combination. If you want to find out more about how common CMS frameworks work, then PHP is still a good choice as many of them are based on PHP (Mambo, Joomla, WordPress, Drupal, etc etc).
If you want to explore serious commercial web app development, then you might be better off looking at more robust and structured alternatives such as Ruby/Rails, Groovy/Grails etc. Or get really good at JavaScript which is used everywhere on the web.
If you are looking for a marketable skill, then it's kind of mixed: PHP is used all over the place so there is a lot of PHP work around, but it often tends to be used more for relatively small-scale systems and there are lots of people with low/medium skills in PHP, so PHP jobs may not pay particularly well compared to Java work for example.
And if you want a transferable skill, Python or Groovy might be a better choice, because you can use them in a lot of different contexts, whereas PHP is really restricted to the web server. Groovy is less commonly used but runs on the JVM so it allows you to take advantage of all the Java libraries, while Python is being used increasingly widely for all kinds of applications.
To give you a sense of the comparative marketability of various scripting languages, I just ran a dumb query for jobs with each of the following skills into the UK
JobServe engine:
Groovy: 31 jobsRuby: 132 jobsPython: 307 jobsPHP: 632 jobsJavaScript: 1569 jobs
Meanwhile, there are 2663 Java jobs and 641 MySQL (mostly DBA) jobs advertised currently.
FWIW, my instinct right now would be to pick Python or JavaScript if you want to learn a marketable scripting language with good future prospects, and I can highly recommend the book
Head First Python for anybody who wants to go down that route.
But don't spend any more time agonising over the choice - just pick one and start learning it now!