Argh... as soon as I learn one thing I find another way I could do it better...
I just wrote a mysql database/class - now I discover mysqli. (Yeah i know I am a n00b - a better person would have know about mysqli in the first place.) Anyways, should I abandon my mysql class and use the built-in mysqli class??
Thanks
Shears
mysqli vs mysql
Moderator: General Moderators
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
Even thought Mysqli has been around a long time you will find many shared hosting companies don't have it enabled. So to be safe you should either stick with just Mysql. The otehr alternative is to support both with your class and perform a check to see if Mysqli is enabled and use it instead and if not drop back to Mysql.
Re: mysqli vs mysql
What does mysqli offer you that you don't have in the mysql extension? And why do you need it?Shears wrote:I just wrote a mysql database/class - now I discover Anyways, should I abandon my mysql class and use the built-in mysqli class??
(Btw, i would find it hard to believe that it would be hard to change the implementation from using mysqli instead of mysql)
Re: mysqli vs mysql
Nothing at the moment. I just heard stuff about it being faster/securer/better; and there may be in the future a time when I want to use some of it's extended functionality... It seems logical to me to use it if it's available. I guess about what Panama Jack said, it's similar to too few people using PHP5timvw wrote:What does mysqli offer you that you don't have in the mysql extension? And why do you need it?
http://devzone.zend.com/node/view/id/686
Re: mysqli vs mysql
timvw wrote:What does mysqli offer you that you don't have in the mysql extension? And why do you need it?
a few posts back..
nathanr wrote:if you want to use cursors, prepared statements, or multiple result sets then you'll be needing mysqli