Grow your CSS skills. Land your dream job.

php oop

  • # February 9, 2009 at 9:55 am

    Are there any php OOP gurus hanging around here?
    I just started messing around with with it, and i have a few questions about it.

    Ill start with one:
    1) How do i properly use a database class? When i google for it there are millions of options so i dont know what is right and what is wrong.

    Can anyone help me out?

    # April 8, 2014 at 12:41 am

    You can use PDO or MySQLI method to connect to database and querying database.it is supported well for PHP OOP method.

    # April 8, 2014 at 8:04 am

    If you’re comfortable with PHP already, but looking to jump into OOP finally… most of the time I recommend reading all of Laravel’s docs: http://laravel.com/

    You’ll learn about all the best practices this way. If you have specific questions about things in there, at least then you’ll know it’s the correct way of doing things and we can talk it out.

    # April 8, 2014 at 11:54 am

    Is this question about OOP in PHP or is this about use of PDO?

    __
    # April 8, 2014 at 2:24 pm

    Is this question about OOP in PHP or is this about use of PDO?

    Or should we be asking why we’re suddenly contributing to a conversation that’s been abandoned since the beginning of 2009?

    @Chathula, there’s at least one other thread you posted in that hadn’t been active for several years. The conversation is dead. Even if you have a similar question, it is best to start a new conversation.

    # April 8, 2014 at 2:31 pm

    @traq, haha that date def. needs to be prominent.

    __
    # April 8, 2014 at 3:13 pm

    that date def. needs to be prominent.

    yeah, it’s pretty easy to overlook. But I’m assuming @Chathula found this thread by searching the site —it’s best to make date-checking a habit in cases like that.

    # April 9, 2014 at 9:59 am

    Hey OP i’m in similar situation. I know basics of PHP and started learning PHP OOP while ago. I can’t recommend highly enough Matt Zandstras book “PHP objects, Patterns, and Practice“. If one does not learn OOP with this book all hope is gone.

    What comes to accessing databases i would say use PDO class. Yes, its bit slower than native MySQLI, but once you fully understand PDO you can use it with all other databases as well. MySQL is dying (not anytime soon, but sooner or later) so it wiser to put your bets on horse that will win in longer run.

    EDIT: Just noticed OP date. scratching head

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".