Page 1 of 2
Book advice?
Posted: Sun Jan 21, 2007 12:19 pm
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.
Posted: Sun Jan 21, 2007 2:26 pm
by feyd
You don't require MySQL 5 to work with PHP 5.
Posted: Sun Jan 21, 2007 2:32 pm
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.
Posted: Sun Jan 21, 2007 2:35 pm
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.
Posted: Sun Jan 21, 2007 2:48 pm
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.
Posted: Sun Jan 21, 2007 2:52 pm
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.
Posted: Sun Jan 21, 2007 2:55 pm
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.
Posted: Sun Jan 21, 2007 3:40 pm
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.
Posted: Sun Jan 21, 2007 4:16 pm
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.
Posted: Sun Jan 21, 2007 4:18 pm
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
Posted: Sun Jan 21, 2007 6:52 pm
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.
Posted: Sun Jan 21, 2007 7:10 pm
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?
Posted: Sun Jan 21, 2007 7:22 pm
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.

Posted: Sun Jan 21, 2007 7:27 pm
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.
Posted: Sun Jan 21, 2007 10:05 pm
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.