A Good PHP & MySQL Programming Book?

LogoLept

Member
Joined
Jul 24, 2019
Messages
10
Hello everyone.

I would like to know if there are any good books you guys would strongly recommend on learning PHP & MySQL Programming, like JavaScript: A Beginner's Guide or HTML: A Beginner's Guide (the blue books)?
https://www.amazon.com/JavaScript-Beginners-Fourth-John-Pollock/dp/0071809376
https://www.amazon.com/HTML-Beginners-Guide-Wendy-Willard/dp/0071809279

I find both of these books very helpful with the step-by-step training wheels they provide like the summary questions, practical exercises, code examples, and summary answers in the back of the book,
albeit I don't know how relevant the information in these books are in today's programming world. (I am often told the things we are learning is very outdated.)

The PHP book we are currently using is not always very clear with its instructions. It often leaves us searching the Internet for the right answers and code, because it does not provide
answers for its questions, nor the illustrations of what the code should look like for its practical exercises (most of the time). This book:
https://www.amazon.com/PHP-Programming-MySQL-2ND/dp/B0047T90EW

Our lecturer may be very smart, but teaching is not something that everyone is blessed with. We have had meetings to discuss and improve his teaching, but to no avail.
I feel we would be better off working through a good book on our own.

Please help. :(
It would be immensely appreciated.

Warm regards,
a programming noob.
 

CT_Biker

Expert Member
Joined
Sep 10, 2016
Messages
1,645
I am not sure of which PHP book would be good, I am a Python Dev and I taught myself using a Dummies guide and the Python Documentation. I learned more from the Docs than from the Dummies guide, but I needed both.

I'd suggest that you familiarize yourself with the associated documentation for which ever language/or tools you use.
 

retromodcoza

Well-Known Member
Joined
Mar 4, 2006
Messages
267
Hello everyone.

I would like to know if there are any good books you guys would strongly recommend on learning PHP & MySQL Programming?

(I am often told the things we are learning is very outdated.)

The PHP book we are currently using is not always very clear with its instructions. It often leaves us searching the Internet for the right answers and code, because it does not provide
answers for its questions, nor the illustrations of what the code should look like for its practical exercises (most of the time).

I feel we would be better off working through a good book on our own.

teaching is not something that everyone is blessed with
Welcome to code. What you are experiencing is completely normal and expected. You sound like you are on the right track , doing the right things , and experiencing the correct frustrations. If you were breezing along and having a great time , then I would be concerned. But you're not. Which is great.

Bchip got it right. While the cartoon is humorous , its a bit cryptic for beginners.

Lets address the bits quoted above :

1. No. For learning to code (not theory) , books arent going to help. A new book wont help. Any books wont help. I would throw the books in the bin if I was new to coding. (My biased and anti-book opinion). The problem with books is that they are physical. They don't respond dynamically to the problem at hand and any sub problems which may appear. They prescribe an idealistic , set in stone best case scenario which never happens in reality. Its great that youre learning this the hard way , but now is the time to end the pain. If this is a setwork book which you have to follow , take the questions and requirements out , and leave everything else. You will work out how to answer them yourself.

The instructions in your book are not clear because they cannot be. In any book. There is too much if/then complexity in even setting up an working environment that cannot be reduced to a single step by step instruction set. Therefore , there cannot be any answers in a book.

Illustration :
Book: install wamp , click next , then finish. Open wamp. Now that wamp is open , create a file...."
Me : "But wamp isnt running? Its yellow. Why isn't it running? I cannot continue. (Searches for online answers)
Reason : Skype is using port 80. Wamp also wants to use port 80. But skype is blocking it. So Wamp has to be opened first , then skype. Skype will then recognize that port 80 is being used and pick another port to operate on , because its smart like that.

How do you put that scenario in a book and forsee any eventuality that may arise? You cant.

2. No books. Code is something you have to work out on your own. From day one. Although.....

3. You cannot teach someone to code. I don't think coding is a teachable skill. I think , however , that it is a learnable skill. So , the teaching has to be learning driven , so to speak. Heres what this means in practice :

Get him to sit down with you and pair program. I hate pair programming , but for upskilling it works well. Before this , you would have tried to solve a problem or have written a piece of code and failed. Now , he sits down with you and either codes the solution with you watching or repairs your solution. Then he explains in great detail why your code didn't work.

Then you repeat this process. Over and over again. Eventually you will get the hang of it. The complexity will seem controllable. You'll start to diagnose your own problems and the burden of hopelessness will get lighter.

4. Don't worry about what you learn being out of date. You will be learning the basics , and the basics are timeless. For example , loops , if/then statements , variables , arrays , etc have been the cornerstones of code for 30 years. They haven't changed.

Are you in high school?
 

flippakitten

Expert Member
Joined
Aug 5, 2015
Messages
1,324
I've alway found the best way to learn a new language or framework is to find a personal need and then try and build a product to fulfill that need. Put together a rough MVP and get cracking.

1. Sketch out a basic UI with the absolute least amount features.
2. Build the UI (forget the styling, it's not what you're here for)
3. Build the backend
4. Merge the two
5. Throw it all aways and implement it correctly.

A blog app is always a good thing to try and implement.
So if you think about it, at first all you need are Users, Blogs and Posts tables, don't worry about authentication yet. Work out the relations between those, like maybe a user might have one blog but will also many posts. Or a user could have multiple blog posts

When I started, I found using https://www.mysql.com/products/workbench/ to built the relations visually and then having a look at the actual queries gave me a good understanding of sql.

As you go, research and figure out how to get it working.

Once you have something working, push it to github and ask around for someone to offer you advice on the code quality.
 

LogoLept

Member
Joined
Jul 24, 2019
Messages
10
Welcome to code. What you are experiencing is completely normal and expected. You sound like you are on the right track , doing the right things , and experiencing the correct frustrations. If you were breezing along and having a great time , then I would be concerned. But you're not. Which is great.

Bchip got it right. While the cartoon is humorous , its a bit cryptic for beginners.

Lets address the bits quoted above :

1. No. For learning to code (not theory) , books arent going to help. A new book wont help. Any books wont help. I would throw the books in the bin if I was new to coding. (My biased and anti-book opinion). The problem with books is that they are physical. They don't respond dynamically to the problem at hand and any sub problems which may appear. They prescribe an idealistic , set in stone best case scenario which never happens in reality. Its great that youre learning this the hard way , but now is the time to end the pain. If this is a setwork book which you have to follow , take the questions and requirements out , and leave everything else. You will work out how to answer them yourself.

The instructions in your book are not clear because they cannot be. In any book. There is too much if/then complexity in even setting up an working environment that cannot be reduced to a single step by step instruction set. Therefore , there cannot be any answers in a book.

Illustration :
Book: install wamp , click next , then finish. Open wamp. Now that wamp is open , create a file...."
Me : "But wamp isnt running? Its yellow. Why isn't it running? I cannot continue. (Searches for online answers)
Reason : Skype is using port 80. Wamp also wants to use port 80. But skype is blocking it. So Wamp has to be opened first , then skype. Skype will then recognize that port 80 is being used and pick another port to operate on , because its smart like that.

How do you put that scenario in a book and forsee any eventuality that may arise? You cant.

2. No books. Code is something you have to work out on your own. From day one. Although.....

3. You cannot teach someone to code. I don't think coding is a teachable skill. I think , however , that it is a learnable skill. So , the teaching has to be learning driven , so to speak. Heres what this means in practice :

Get him to sit down with you and pair program. I hate pair programming , but for upskilling it works well. Before this , you would have tried to solve a problem or have written a piece of code and failed. Now , he sits down with you and either codes the solution with you watching or repairs your solution. Then he explains in great detail why your code didn't work.

Then you repeat this process. Over and over again. Eventually you will get the hang of it. The complexity will seem controllable. You'll start to diagnose your own problems and the burden of hopelessness will get lighter.

4. Don't worry about what you learn being out of date. You will be learning the basics , and the basics are timeless. For example , loops , if/then statements , variables , arrays , etc have been the cornerstones of code for 30 years. They haven't changed.

Are you in high school?

@retromodcoza Thank you so much for taking the time to write back. I'm a second year graphic & web design student. We only did HTML in our first year. I guess that about says why I'm struggling so much with this, but that doesn't explain why we have to study one of the toughest coding languages. (Our amazing ActionScript lecturer said PHP syntax is "nasty"; he's doing his masters in computer science.)

Our subject schedule is jam packed, because this is more of a practical course. We receive assignments on assignments, and I understand that coding will take time to get into, and it does interest me, but we have our PHP period once every week alongside the 8 other subjects (JavaScript and ActionScript being 2 of them).

Our new PHP & JS lecturer is a strange person, because most of the time he plainly does not respond to our questions, and that's where our drama with him lies, but I think he struggles to express himself the way you did here. I realised this is a broken education system, because we are not nearly as knowledgeable as we should be when we get our coding assignments (we had to code a calculator in JavaScript for our first assignment, and we had only touched on variables, arrays and statements. We "cheated" with YouTube to complete the assignment.) I also realised, just like with Scratch back in high school, that this isn't a "extra subject" that you can simply cram in a couple'o hours.

So I thought to myself: I'll take as much as I can out of his teachings, just try to pass at the end of the year and get a better book, or resources with which to teach myself.

We do often ask him to sit down with us and do the code with us, but our pleas fall on deaf ears, or he says there isn't enough time, and he's kind of right.

Thank you for sharing your opinion and advice. It seems very valuable. It's good to hear what we are learning isn't completely useless or "outdated".
(We use XAMPP for our PHP exercises.)

Warm regards.
 

LogoLept

Member
Joined
Jul 24, 2019
Messages
10
I've alway found the best way to learn a new language or framework is to find a personal need and then try and build a product to fulfill that need. Put together a rough MVP and get cracking.

1. Sketch out a basic UI with the absolute least amount features.
2. Build the UI (forget the styling, it's not what you're here for)
3. Build the backend
4. Merge the two
5. Throw it all aways and implement it correctly.

A blog app is always a good thing to try and implement.
So if you think about it, at first all you need are Users, Blogs and Posts tables, don't worry about authentication yet. Work out the relations between those, like maybe a user might have one blog but will also many posts. Or a user could have multiple blog posts

When I started, I found using https://www.mysql.com/products/workbench/ to built the relations visually and then having a look at the actual queries gave me a good understanding of sql.

As you go, research and figure out how to get it working.

Once you have something working, push it to github and ask around for someone to offer you advice on the code quality.
Thank you for your suggestion and the link @flippakitten .
 

_kabal_

Expert Member
Joined
Oct 24, 2005
Messages
2,719
if I was you, I would rather look at “modern” JavaScript. You say you are currently doing actionscript, so I assume the JavaScript is ES3.

You can get up and running basically instantly.

https://www.udemy.com/the-complete-javascript-course/

Do that course.

That will make it much easier to understand how vue/react/angular works, which in turn would make me want to interview you for a junior position more than someone who started learning php.

Nothing wrong with php, 7.3 is good, and awesome stuff coming in 7.4 and 8
 

LogoLept

Member
Joined
Jul 24, 2019
Messages
10
if I was you, I would rather look at “modern” JavaScript. You say you are currently doing actionscript, so I assume the JavaScript is ES3.

You can get up and running basically instantly.

https://www.udemy.com/the-complete-javascript-course/

Do that course.

That will make it much easier to understand how vue/react/angular works, which in turn would make me want to interview you for a junior position more than someone who started learning php.

Nothing wrong with php, 7.3 is good, and awesome stuff coming in 7.4 and 8
Thanks @_kabal_ We purchased that course as well as another PHP course last night for a very good price.
 
Top