I am done with HTML and CSS. Now I want to know whether I should study PHP and SQL together or individually. Basically, I have this book, O'Reily Head First PHP and MySQL. Should I take this book or start with a book for PHP only? And is there any difference?
|
|
migrated from stackoverflow.com May 31 '11 at 5:46
|
I'd say study it together. The majority of PHP applications you'll ever build are likely to involve some kind of database interaction, and MySQL is most popular seen in light of PHP. You might not become familiar with all the 'inner workings' of MySQL, but you'll learn what you need to know to get going. Furthermore, i don't think you should look at MySQL as a topic which will 'steal' your attention from PHP. A large proportion of working with MySQL databases in PHP is all about learning how to communication with the databases (using PHP) and will become good exercises themselves. |
|||||||||
|
|
As most programmers aren't DBAs, I'd suggest studying PHP in depth and learning the basics of MySQL as you encounter them. Having said that, I'd also strongly suggest that once you're confident with the PHP that you've learned, that you do spend time learning some of the more advanced MySQL topics. IMHO, it's better to split the two up this way as both subjects are quite deep. Edit: This would also most likely be better asked on programmers.SE. |
|||
|
|
|
if you want to learn from basic think in php then start only php first see the syntax and clear the concept of the php and it's easy also. you can start to read both simultaneously. |
|||
|
|
|
Together I say. What ever book or tutorial you're following will almost often teach you how to interact with a database after a few chapters. However, I do suggest that you spend some (not much) time learning MySQL basics before you jump on to PHP. You can then take timeout from learning PHP to catch up with advanced MySQL. |
|||
|
|
|
It really depends on your programming background. If all you have worked with is html and css then you'll find that working with php will be quite different and will take much time to master. However, if you do have other programming experience (i.e. c/c++, java, etc), then you likely will have no problem at all studying them together. That being said either way you may be fine to study them together as sql really isn't that difficult to pick up the basics, and is more than a little handy to use in web applications. Ultimately you'll have to decide how you feel you're handling it as you start learning either or both. Another option might be to study the basics of SQL first (shouldn't take you very long to do this) then start in on studying both of them together. |
|||
|
|
|
I'd say separate. I've seen too many confused beginners unable to clearly distinguish the SQL part from the PHP part, concatenating values into queries and happily mixing SQL queries, PHP code, HTML, and javascript, and then wondering why they can't execute javascript in their SQL queries, or why they can't do SQL queries in a javascript function or something. Grasping HTTP, PHP and HTML is confusing enough as it is. |
|||
|
|