The Simple PHP MySQL Library


Get Notified of Updates E-Mail:


June 17, 2014

Version 2.3 released

June 2, 2013

Version 2.2 released

  • DB::queryFullColumns() allows accessing seeing full column names (including table names). Useful for JOIN queries that include several tables with an id column.
  • DB::disconnect() allows quick disconnecting
  • %? query variable allows auto-detection of data types
  • %t and %lt variables allow easily setting MySQL DATETIME and TIMESTAMP fields.
  • DB::$usenull can be used to decide whether NULL gets replaced with empty string in insert/replace/update/delete commands. Useful since lots of people set string fields to NOT NULL in MySQL.
  • Major bugfix: don't choke when CALL commands are used.
  • Minor bugfix: can use null as a value for named or numbered parameters.
  • Minor bugfix: successful insert/replace/update/delete commands return true, since some people try putting these in if statements for some reason.
  • Minor bugfix: %i doesn't truncate big ints on 32-bit systems

September 20, 2012

Version 2.1 released

December 29, 2011

Version 2.0 released

September 23, 2011

Version 1.7 released

  • "Non-SQL" errors (e.g. can't connect to MySQL server, or bad MeekroDB syntax) now have their own error handlers: DB::$nonsql_error_handler and DB::$throw_exception_on_nonsql_error
  • DB::insertIgnore() lets you have INSERT IGNORE with the standard MeekroDB INSERT syntax
  • DB::insertUpdate() lets you have INSERT .. ON DUPLICATE KEY UPDATE with a variety of options for ease of use
  • DB::queryRaw() lets you get back a MySQLi_Result instead of the usual array of associative arrays
  • the new WhereClause() helper class lets you construct the WHERE component out of pieces, and apply the usual MeekroDB variable substitution syntax to each piece
  • Bugfix: When you use DB::insert() to insert something with a null value, you'll actually get NULL inserted, rather than an empty string.

April 29, 2011

Version 1.6 released

April 8, 2011

Version 1.5 released -- You can now pass MySQL functions such as NOW() through insert(), replace(), and update() directly to MySQL. See the docs on insert() and update() for examples.

March 31, 2011

Version 1.4 released -- Modified queryFirstField() and queryFirstColumn() to rely on fetch_row rather than fetch_assoc on the backend. This will make them slightly faster, but doesn't change how they work from the user's perspective. Also, added queryFirstList(), which is like queryFirstRow() except it returns a non-associative array which can be easily caught with list().

March 15, 2011

Version 1.3 released -- Added full PHP 5.2 compatability. Added DB::$port variable to specify non-default MySQL port. Modified DB::debugMode() so you can specify your own debug handler, which will be run after every successful SQL query.

March 4, 2011

Version 1.2 released -- Added more flexible error handling. You can set DB::$error_handler to replace the standard function that gets called on errors. The default one will spit out debugging information and then die, but yours can do whatever. You can also set DB::$throw_exception_on_error if you want SQL errors to cause exceptions to be thrown.

March 2, 2011

Updated v1.1 for better compatability with PHP 5.2.

February 28, 2011

Version 1.1 released -- MeekroDB no longer produces warnings when used with PHP error reporting level E_ALL.

Copyright (C) 2008-2020 :: :: LGPL v3 :: GitHub Tracker