Page 1 of 1

Basics: MySQL - MySQLi

Posted: Mon Feb 04, 2013 3:23 pm
by Lykos22
Hi Jacek, I was watching recently your video on Basics about the mysqli. I'm really sorry for posting about this subject, as there are a lot of discussions, as you've said about it.

I 'm still using the mysql_* mostly, as I'm writting more proceedurePHP than OOP, just because i'm used to this 'approach'. I'm not saying that I'm not using and mysqli at all, I use it more in OOP.

As its been a while since you've published this tutorial and since in php.net there are alot of notification telling about mysql_* is going to deprecated as of PHP 5.5.0, does this mean that the change to mysqli_ is a MUST now? the mysql_* will not be updadted any more or stop "existing"?

Re: Basics: MySQL - MySQLi

Posted: Tue Feb 05, 2013 12:50 am
by jacek
It means that some time after 5.5 the mysql_* functions will be removed. It would be a good idea to get used to the replacement before that happens. You can use mysqli in the same way as the old mysql version simpley by adding the "i" mysql_connect => mysqli_connect for example.

Also worth noting that 5.5 and then 5.6 are both a long way off so there is no need to panic just yet.

Re: Basics: MySQL - MySQLi

Posted: Tue Feb 05, 2013 11:59 am
by Lykos22
jacek wrote:You can use mysqli in the same way as the old mysql version simpley by adding the "i" mysql_connect => mysqli_connect for example.

Well, it looks to me (at least) a bit different as the mysqli_* looks like more OO, so if there's a php page with simple PHP script its getting a little bit weird all this mix. :?

Re: Basics: MySQL - MySQLi

Posted: Sun Feb 24, 2013 2:06 pm
by jacek
You can use it OO style or procedural style. I prefer the OO version but it is possible to just add an "i" to all the function names.

Re: Basics: MySQL - MySQLi

Posted: Sun Feb 24, 2013 2:17 pm
by Lykos22
jacek wrote:You can use it OO style or procedural style. I prefer the OO version but it is possible to just add an "i" to all the function names.

I have recently tried it. I hadn't read the manual till then about it to be honnest :roll:, but still has some differences not only in syntax, for example there's no mysql_result() function in msqli