Help! mysqli question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
osaka_x
Forum Newbie
Posts: 1
Joined: Sun Nov 28, 2010 4:25 pm

Help! mysqli question

Post by osaka_x »

Hello, i'm working on a project in PHP, and i'm trying to use the new features like namespace and mysqli (instead of the normal one), etc.

Should i use the procedural style or object oriented style? I want the best performance, and I will adapt to either class or functions.

Right now, i'm using static classes so (i believe) they don't do overhead, and using the mysqli procedural style, but it might be stupid if mysqli internally is a class.

Thanks
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Help! mysqli question

Post by Jonah Bron »

Yes, you should start in OOP (object oriented programming). As far as I know, there's no real performance difference between OO and procedural. One of the big advantages of OOP is maintainability. If designed well, OO code is way easier to deal with than procedural code. The key is to know how/when to separate your objects and methods. I think that can only come with experience.
Post Reply