Book advice?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

derek barnstorm
Forum Commoner
Posts: 36
Joined: Thu May 18, 2006 11:23 am

Book advice?

Post by derek barnstorm »

Hi,

I am total novice and I’m about to buy a book on PHP. I actually want to learn PHP5, but I’m under the impression that to use PHP5 I would need MySQL5. With my hosting plan I only have MySQL 4.1.21. I have PHP 4.4.4 and PHP 5.1.2 installed but have always had problems connecting to the data base.
Could anybody give me some advice and recommend a good book which will cover the versions of PHP and MySQL I have? Is it possible to connect to an old database using PHP5?

Thanks,

Des.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You don't require MySQL 5 to work with PHP 5.
derek barnstorm
Forum Commoner
Posts: 36
Joined: Thu May 18, 2006 11:23 am

Post by derek barnstorm »

Okay, It's just that some of the tutorials that I have done on PHP5 have only gone into connecting to the database one way, and I didn't want to waste my money on a book that was no good to me.
I was thinking about maybe this one:

http://books.google.co.uk/books?vid=ISB ... UI#PPP1,M1

What do you think? And would you recommend learning PHP5 rather than PHP4?

Thanks,

Des.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I recommend learning both PHP 5 and 4. People don't always have the luxury of working on the latest versions of PHP, so being able to speak in both branches is helpful.
derek barnstorm
Forum Commoner
Posts: 36
Joined: Thu May 18, 2006 11:23 am

Post by derek barnstorm »

Thanks very much for the advice. I don't suppose you could recommend a book though, which you know has totorials on conecting to MySQL 4.1.21 with PHP5?

I think it was the mysqli_fetch and mysqli_connect commands that I was having trouble with. I take it you need MySQL5 for that?

Thanks again,

Des.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I have not read a single book or tutorial on PHP, MySQL or Apache.

MySQLi is for connecting to 4.1 and higher, however the older MySQL extension can be updated to do the same via a download from the MySQL site.
derek barnstorm
Forum Commoner
Posts: 36
Joined: Thu May 18, 2006 11:23 am

Post by derek barnstorm »

Okay, thanks very much for your time.

I guess I'll just jump in there and do a bit of trial and error.

Thanks,

Des.
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post by matthijs »

Some books on PHP I use:
- The PHP anthology by Harry Fuechs
- PHP 5 Objects patterns and practice by Matt Zandstra
- beginning MySQL database design Jon Stephens and chad russell
- php architects guide to design patterns by jason sweat
All books I enjoyed a lot and still learning from them.
derek barnstorm
Forum Commoner
Posts: 36
Joined: Thu May 18, 2006 11:23 am

Post by derek barnstorm »

Thanks for list of books, I will check them out.

I'm just totally stuck where and how to start learning it really - I'm also obviously limited as MySQL and PHP are installed by my web host, so I can't update them myself.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Totally stuck? Well, like most programming languages, it's nice to have a basis of other programming languages to work on. If you don't have much or any programming background, then your best bet is to start with a good beginners book.. You know, one that doesn't always compare the language to C++ as though you're already familiar with it.

Library? Search the catalog for PHP. It's free. :-p
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

derek barnstorm wrote:Thanks for list of books, I will check them out.

I'm just totally stuck where and how to start learning it really - I'm also obviously limited as MySQL and PHP are installed by my web host, so I can't update them myself.
Why don't you install apache on your own machine and then you could run whatever versions of php and mysql you like.
derek barnstorm
Forum Commoner
Posts: 36
Joined: Thu May 18, 2006 11:23 am

Post by derek barnstorm »

Right, thanks! That's exactly the sort of thing I need to know. So I can install Apache on my computer and then install PHP and MySQL on my computer? How do I go about it?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

Umm the easiest way would be to grab one of the all-in-one packages, but you could (if you wanted to) install them all by downloading and following the instructions provided on their websites. For now, I'd recomment just using wampserver or xampp

I've never used xampp, but wampserver worked well for me until I decided to try installing apache2/php5/mysql5 and discovered it's not all that difficult if you just read the instructions. 8)
Last edited by Luke on Sun Jan 21, 2007 7:29 pm, edited 1 time in total.
derek barnstorm
Forum Commoner
Posts: 36
Joined: Thu May 18, 2006 11:23 am

Post by derek barnstorm »

Okay, Brilliant! A stupid question though... when creating PHP pages, can I view them without being connected to the inernet or my server? Is it all done locally?

Thanks again,

Des.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

PHP is server-side code, so yeah, you'd have to be connected to a server with PHP installed, and I'm assuming you don't own one.

Now I haven't really researched it personally, but I do believe that there are PHP coding programs that allow you to see the results of your coding. In fact, I'm at least 90% sure they exist. Gahh... see now I gotta know. I'll Google it. You should too.
Post Reply