MySQLi vs PDO?

Status
Not open for further replies.

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Hey,

I want to try something but I heard not to use mysql_connect no more, so basically which one to go for out of MySQLI and PDO_MySQL? What are the pros and cons of each?

- Thanks.
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,933
I personally use MySQLi.

The only differences that I know between the two is how you bind params during a query, other than that, I don't know anything major MySQL wise. However, PDO supports more than just MySQL, so that's a plus for people who use something else, but that's all I can think of.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
I personally use MySQLi.

The only differences that I know between the two is how you bind params during a query, other than that, I don't know anything major MySQL wise. However, PDO supports more than just MySQL, so that's a plus for people who use something else, but that's all I can think of.

Thanks for the reply, I had a play with MySQLi a while ago after you posted your thread with the tutorial, thing that got me interested into PDO was PHPAcademy, lol. - I doubt I'd use PDO for more than just MySQL, so I guess I might go with MySQLi.

Anyone else before I decide? ;'D
 

Kryptos

prjRev.com
Jul 21, 2010
2,205
1,252
Personally I think both are pretty good, although this can give you an idea. Extracted from

Screen%20Shot%202012-09-10%20at%2012.21.38%20AM.png


So here basically you should go for MySQLi in my opinion, but a plus for PDO is that you can use it for almost any database driver ( Oracle, SQLite, MySQL, Ms SQL, PostGre, IBM ) which is pretty cool and neat.

So, it's up to you to decide - You can always go hardcore and use both ( So awesome, do it for Rev3 can explain you how on MSN )
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Personally I think both are pretty good, although this can give you an idea. Extracted from

Screen%20Shot%202012-09-10%20at%2012.21.38%20AM.png


So here basically you should go for MySQLi in my opinion, but a plus for PDO is that you can use it for almost any database driver ( Oracle, SQLite, MySQL, Ms SQL, PostGre, IBM ) which is pretty cool and neat.

So, it's up to you to decide - You can always go hardcore and use both ( So awesome, do it for Rev3 can explain you how on MSN )

Thanks, I guess I could go 'hardcore' and do both for some practice, as I'll only be needing one, - but meh, for now I'll just go MySQLi, but thanks, probably will endless nag you anyway, ;].
 

lepos

thinking about you. yes you
Dec 11, 2011
2,024
687
I've not much to comment on but seeing the above posts and doing my fair share of research I suppose you should go for MySQLi or do what said and go 'hardcore', though MySQLi is the best option by the looks of it :up:
 
Status
Not open for further replies.

Users who are viewing this thread

Top