Good PHP by Example Book?

lchyi

Senior member
May 1, 2003
935
0
0
I'm not really new to PHP but I really want to have a PHP Cookbook type supplement that is very simple and leads by example. For example, I really want to know how to program a simple MySQL query with PHP that will only pull up 5 entries or pictures per page with an option to display all or view 10, 15, 25 per page. While in principle I could figure this out (finding the right script on the internet is a ah heck sometimes), I want a book that displays the principles of this concept through an example. I feel I learn the best that way. Has anyone read anything or have anything that they have on their current bookshelf they could recommend?
 

randay

Lifer
May 30, 2006
11,019
216
106
I don't know what exactly it is you are looking for, but I really like the "wrox" books. You should have a look at them and others at a bookstore or something.
 

purbeast0

No Lifer
Sep 13, 2001
52,859
5,730
126
if you have general programming knowledge, PHP is a cinch to pick up on. i mean i am by no means an expert, but i actually learned the stuff you are trying to do just by finding examples on the web and following them. but then again, i also have a degree in computer science.

i also did no DB stuff in college, but SQL is SSSOOO easy to learn.
 

Supermercado

Diamond Member
Jan 18, 2002
5,893
0
76
I can't remember the name of it off the top of my head but a few years ago when I wanted to have that same type of book on hand, I bought what turned out to be a pretty good one that sounds like it would fit the bill. I can check the title and get you the ISBN and PM it to you when I get home if you want.
 

mugs

Lifer
Apr 29, 2003
48,924
45
91
Well, if you know anything about programming at all, then that's a pretty simple problem once you know the language.

I suggest not wasting your money on a book *yet* but instead starting with the tutorials/documentation at http://www.php.net
 

lchyi

Senior member
May 1, 2003
935
0
0
Books always seem like a better option than the internet for me. To me, they feel a lot more complete, just my 2 cents. But I did learn a ton of PHP on the internet through scripts. It seemed like a natural extension of the programming classes I was taking at the time.
 

ngvepforever2

Golden Member
Oct 19, 2003
1,269
0
0
Originally posted by: purbeast0
if you have general programming knowledge, PHP is a cinch to pick up on. i mean i am by no means an expert, but i actually learned the stuff you are trying to do just by finding examples on the web and following them. but then again, i also have a degree in computer science.

i also did no DB stuff in college, but SQL is SSSOOO easy to learn.

QFT

Regards

ng
 

GeekDrew

Diamond Member
Jun 7, 2000
9,100
13
81
Originally posted by: lchyi
I'm not really new to PHP but I really want to have a PHP Cookbook type supplement that is very simple and leads by example. For example, I really want to know how to program a simple MySQL query with PHP that will only pull up 5 entries or pictures per page with an option to display all or view 10, 15, 25 per page. While in principle I could figure this out (finding the right script on the internet is a ah heck sometimes), I want a book that displays the principles of this concept through an example. I feel I learn the best that way. Has anyone read anything or have anything that they have on their current bookshelf they could recommend?

I own this and this. They were a last-minute buy at Barnes & Noble a year or two ago, when I needed to get a PHP/MySQL website up and running within two days. Don't think that they will teach you *anything* about best practices, because they won't. Neither touch on OOP, either, but if all you need is a PHP & MySQL reference, those are two that I recommend.

That said, since I've been doing more and more in PHP lately, http://www.php.net has become a favorite.
 

2Xtreme21

Diamond Member
Jun 13, 2004
7,045
0
0
If you're totally new to PHP, look into something that teaches you a little about server-side programming and database incorporation before you start with actual scripting. It might save you a good deal of hastle when you get stuck on "why" something works and are unable to figure it out with just the php book alone. I find that php.net can be extremely confusing if you don't even have a moderate grasp on the language too.
 

GeekDrew

Diamond Member
Jun 7, 2000
9,100
13
81
Originally posted by: 2Xtreme21
If you're totally new to PHP, look into something that teaches you a little about server-side programming and database incorporation before you start with actual scripting. It might save you a good deal of hastle when you get stuck on "why" something works and are unable to figure it out with just the php book alone. I find that php.net can be extremely confusing if you don't even have a moderate grasp on the language too.

I started off knowing nothing at all about PHP, and very, very little about programming/scripting (aside from BASIC & BATCH), and now I'm able to "keep up with the pros", or so I'm told. It's all about how motivated you are to learn something. ;)

That is to say, I learn far more quickly if I see an example and implementation. After I read an example or two for any given concept, I've got it down. That's why the PHP books I bought were awesome... they jumpstarted me by giving me quite a few examples to work from.
 

Eos

Diamond Member
Jun 14, 2000
3,473
16
81
So which one of you genisues wants to build me a database for cataloging my bootlegs? :D

I'm about 10 pages into PHP For Dummies, so I'm not ready for a full on project.