There aren't many new releases these days because the project has reached a "stable" state and there are no known bugs. However, if I find out about any, I'm happy to fix and put out a new release. You can report bugs on GitHub.
MeekroDB has been Google's #1 search result for "php mysql library" since 2012 and has thousands of deployments worldwide. In that time, we have never had any security issues. The code is developed with a healthy level of paranoia, and automated unit tests check every new version for problems. Our code is open source, and many developers have examined it for security flaws and found none. While there is no such thing as a 100 percent guarantee, an excellent security track record like ours is a good place to start.
Absolutely! The easiest thing to do is just switch between databases with
DB::useDB(). If you actually want multiple connections, you should use new MeekroDB() to create non-static instances of MeekroDB.
You need the line
mysqli.reconnect = 1 in your php.ini file. This file might be in a different place depending on your server, but Ubuntu has
/etc/php5/apache2/php.ini. Because of PHP restrictions, there is no way to change this setting without having root and MeekroDB can't set it for you. See PHP documentation on this for more.
You should use
DB::queryWalk() to retrieve and process the data one row at a time. Learn more about it on the retrieving data page.
If you use
DB::queryWalk(), you must either consume the entire result set or free it. If you do not, you'll get an out of sync error from MySQL when you run your next query. You can "consume" the result set by running next() until it returns false, or you can free the remaining results by running free(). Read the queryWalk() documentation on the retrieving data page for more details.
DB::insert() does not return anything if the operation was successful. If an INSERT fails, MySQL treats this as an error and an exception will be thrown.
On the other hand, a
DB::insertIgnore() will not trigger an error if the INSERT fails. In this case, you can check if it worked by checking the
You can use %% to escape the % character, just like you would with
DB::queryFirstField("SELECT DATE_FORMAT(created_at, '%%H:%%i:%%s') FROM accounts WHERE id=%i", 15);