Re: Help on objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/5/06, Deckard <ml@xxxxxxxxxxx> wrote:
Hi,

I'm trying to lay my hands on PHP OOP, but it's not easy :(
I've read several examples in the web, but cannot transpose to may case.

I'm trying to set a class to make SQL inserts in mysql.


I commend you on trying to build an OOP class for database
abstraction.  Having already been there and done that, might I
introduce you quickly to one of the great advantages of OOP: reuse.

There are already many classes out there built to help accomplish
database interaction.  Yes it's an obvious place for OOP, but as your
first foray into the discipline, I think you're biting off more than
you can chew.

Alternatively, why not download and start using one of the many stable
and community-tested DB classes?  Believe me, I completely relate to
the need to "build it myself", and I don't want to squash that (it's
the best way to learn).  I just don't think it's worth doing it for
database interaction.  It's just not beginner material, and it's
something you'll be using in all of your code from here on out, so
it's best to start with something stable...

My $.02.  Er, £.01.

HTH,
John W

p.s.  I'm sure you want suggestions of good DB classes to use.
Ironically, I use my own, so I don't have extensive experience in
others, but why not look at the Zend Framework (it's what I'm
switching to)?  No need to use the whole framework.  Or others on the
list will surely have their suggestions of classes to use...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux