Hi. Coming for kohana 3 a official mysqli driver?
Feel free to create one, we would probably include it.
Personally, I don't see the point. MySQLi doesn't really offer anything more than MySQL, except that you get an OOP API. Am I missing something?
The "Internet" says its much better. ;)
mysqli have (quotes):
more here (german) http://www.phpbuddy.eu/tutorials-und-workshops/13-mysqli-erweiterung-php-5.html?start=1
Have anybody test this mysqli driver? http://forum.kohanaphp.com/comments.php?DiscussionID=5089&page=1#Item_1
EDIT: Oh, NickUK was faster.
I guess I should have been more clear: What does MySQLi offer that we could implement over MySQL? The answer is: nothing. None of the advanced features of MySQLi could be implemented as defaults because only MySQLi supports them.
Surely it would be trivial to create a MySQLi driver (basically just replace "mysql_" with "mysqli_", but it doesn't appear to me that it would actually have any benefit.
Both PDO and MySQLi support multiple resultsets which I think should be implemented
But not all databases behind PDO do surely? I guess the difficulty Kohana has is that it wants to maintain a standard functionality that is as database agnostic as possible. This is why there is no transaction support even though (some) MySQL tables and many PDO databases can use them.
If you need more advanced but database-specific functionality I think it is sensible that you should have to implement this in your own extension. If Kohana Database module had features that only worked in some DB types with certain tables etc, I think it would result in more confusion and would remove a lot of the benefit of the module as an abstraction layer.
Bottom line: mysqli doesn't add anything that could be implemented without breaking the database agnostic abstraction. For this reason it is sensibly (in my view) left to the developer to implement this as required with the clear understanding that they can't expect the same to work seamlessly across drivers.
You have a point that the docs should say some of this and hopefully they will soon as a lot more attention is turned to them.
I implemented a MySQLi driver some time ago. As shadowhand said, I just replaced all instances of "sql" with "sqli". A 10-20 minute job and done.
See the bottom of http://www.php.net/manual/en/mysqli.overview.php for differences between mysql, mysqli. Everything that I have read suggests that there is no significant speed difference between to two (the benchmarks I've seen vary, and different types of queries produce different results). I prefer mysqli when I'm using the library directly, but I personally don't care too much what's under the hood of the database library.
I might be being completely ignorant, but aren't prepared statements a lot more secure reducing the need for pre-processing?
@Dynamism: The database class has prepared statements built in. But prepared statements and stored procedures are not the same thing.
The advantage of MySQLi is possibility to call stored procedures...
It looks like you're new here. If you want to get involved, click one of these buttons!