7df5c9baa2
update copyright year
Sergey Tsalkov
2012-09-20 21:05:19 -07:00
ed347e841a
verticalslice and reindex cleanups and tests
Sergey Tsalkov
2012-09-20 20:50:05 -07:00
2ffb770f8a
bugfix: don't fail when inserting multiple rows at once, and one of the values is NULL
Sergey Tsalkov
2012-09-19 14:58:09 -07:00
ed9c29fe49
add DB::transactionDepth() for checking how many transactions are active when not using nested transactions, will return 1 or 0
Sergey Tsalkov
2012-09-18 21:08:28 -07:00
9a41bf34a1
a few nested transaction cleanups functionality for committing/rolling back all active transactions
Sergey Tsalkov
2012-09-18 20:54:39 -07:00
24c1b930df
add DBHelper class with functions verticalSlice and reIndex
Sergey Tsalkov
2012-09-18 20:13:43 -07:00
6b324d1291
using $where is now equivalent to $where->text()
Sergey Tsalkov
2012-09-09 14:49:43 -07:00
5b4e5a959a
fix named parameters
Sergey Tsalkov
2012-07-22 17:43:34 -07:00
7582961ee1
named parameters for queries
Sergey Tsalkov
2012-07-22 17:29:59 -07:00
2d49f4f350
remove backtrace from default error message -- it can leak private information
Sergey Tsalkov
2012-07-08 13:04:57 -07:00
9930fc073a
restore %lb parameter to working, add unit test so it doesn't break again
Sergey Tsalkov
2012-02-03 17:19:54 -08:00
788c506f16
success handler gets "affected" var for affected rows
Sergey Tsalkov
2012-01-25 13:59:42 -08:00
bbf9534326
add execution time to tests
Sergey Tsalkov
2011-12-24 17:27:53 -08:00
1d5844bcc0
major redesign to enable multiple instances via "new MeekroDB()" while preserving full backwards compatability
Sergey Tsalkov
2011-12-24 16:12:13 -08:00
34c0f5e0a7
add E_STRICT to tests
Sergey Tsalkov
2011-12-24 13:07:44 -08:00
7825f90080
can now refer to a specific argument in a query e.g. %s2 for the third argument, taken as a string
Sergey Tsalkov
2011-12-17 19:54:55 -08:00
a1f01a4f87
few more fixes and tests for WhereClause
v1.7
Sergey Tsalkov
2011-09-23 22:03:15 -07:00
80cc78edcd
insertUpdate() can now handle a second array for the update component, or nothing, so it'll re-use the insert array for the update component
Sergey Tsalkov
2011-09-23 21:29:40 -07:00
5050205e58
add insertUpdate() function for "insert ... on duplicate key update" behavior
Sergey Tsalkov
2011-09-23 19:15:41 -07:00
9f3aa571dc
add some simple tests for the WhereClause system, which will now be official and documented
Sergey Tsalkov
2011-09-23 18:44:34 -07:00
164c7157a6
queryRaw() will now be officially supported, returns mysqli_result instead of array of assoc arrays
Sergey Tsalkov
2011-09-23 15:57:36 -07:00
f09308a3f7
re-organize test files, make it easy to test for both php 5.2 and 5.3
Sergey Tsalkov
2011-09-23 15:51:35 -07:00
69bfe15ebb
add test case regarding BLOBs
Sergey Tsalkov
2011-08-25 23:54:52 -07:00
7621b50a02
handle non-sql errors (such as failure to connect to MySQL server) in a user-defined way adds DB::$nonsql_error_handler and DB::$throw_exception_on_nonsql_error
Sergey Tsalkov
2011-08-25 23:33:15 -07:00
4122fe52c1
collapse some redundant code into a function
Sergey Tsalkov
2011-06-02 18:57:15 -04:00
8072f6ab07
use static class variable, not static function variable, to hold mysql connection
Sergey Tsalkov
2011-06-01 17:30:28 -04:00
860da8d18a
insert(), replace(), and update() now handle the value NULL correctly
Sergey Tsalkov
2011-05-31 21:50:24 -04:00
0ed2837f3d
on second thought, we won't have insertMany() and replaceMany(), but insert() and replace() will figure out which one you mean
v1.6
Sergey Tsalkov
2011-04-29 01:48:27 -04:00
96892fa6c2
DB::$param_char can now be used to change the char that needs to appear in front of params (% is the default)
Sergey Tsalkov
2011-04-28 18:41:13 -04:00
ad4889da09
revert last commit -- this is a bad way to do it, and I'll have to come up with something else to let people use strings like %i in their SQL and bypass the parser
Sergey Tsalkov
2011-04-28 18:14:59 -04:00
12604d7854
bugfix: let people have literal %'s in their queries without confusing the parser by using %% instead
Sergey Tsalkov
2011-04-23 20:31:18 -04:00
8c5299c2e2
* add insertMany() and replaceMany() to let you do multiple inserts in one SQL command * error and success handlers can now be set to static and object methods
Sergey Tsalkov
2011-04-23 00:46:51 -04:00
964a36e4c2
sqleval() can now be used with %s, %i, and all that good stuff there is probably no good reason to do this, as things like md5() can be done from PHP, but people keep asking for it, so here it is :)
Sergey Tsalkov
2011-04-22 23:29:09 -04:00
68774532e1
add delete() function -- mostly for completeness with insert(), update(), etc
Sergey Tsalkov
2011-04-22 23:15:14 -04:00
2985815750
* add tests for tableList() and columnList() -- those are now supported functions * remove some unused code, minor cleanup
Sergey Tsalkov
2011-04-22 23:03:37 -04:00
4faebb957c
add DB::sqleval() -- can be used with insert() and update() to inject raw sql stuff like NOW()
v1.5
Sergey Tsalkov
2011-04-08 13:56:28 -04:00
819acb9bff
use fetch_row and not fetch_assoc for queryFirstField and queryFirstColumn -- it should be a bit faster
v1.4
Sergey Tsalkov
2011-03-30 13:18:53 -04:00
449760eb2a
set the character encoding in the "more proper" way, as recommended by the mysqli manual
Sergey Tsalkov
2011-03-17 13:14:39 -04:00
74feeb6513
now you can use DB::$success_handler to replace the "debug mode" handler in the same way that you can replace the error handler
v1.3
Sergey Tsalkov
2011-03-15 16:03:56 -04:00
c14c69ffa7
let user specify port with DB::$port -- defaults to mysqli.default_port from the php config (probably 3306)
Sergey Tsalkov
2011-03-15 14:42:58 -04:00
894d8a0530
various fixes for PHP 5.2 compatability -- now finally tested and working with 5.2
Sergey Tsalkov
2011-03-15 13:06:45 -04:00
b6b22833e9
this is distributed under the LGPL v3 -- add copyright information
Sergey Tsalkov
2011-03-13 17:16:18 -04:00
5525d22a9b
we can now throw an exception on errors if DB::$throw_exception_on_error is set
v1.2
Sergey Tsalkov
2011-03-04 17:07:23 -05:00
0a7b323e81
you can now specify your own error handling function by changing DB::$error_handler
Sergey Tsalkov
2011-03-04 16:49:17 -05:00
620c607f61
remove array_map with inline functions for PHP 5.2 compatability thanks to Adam for pointing this out!
Sergey Tsalkov
2011-03-02 12:46:07 -05:00
78c8192fdd
increase "error output" level and fix various minor bugs none of these seem to affect functionality, it's just a matter of clean code thanks to ++ for pointing this out!
v1.1
Sergey Tsalkov
2011-02-28 23:57:04 -05:00
d01a8be627
more basic tests
Sergey Tsalkov
2011-02-22 13:15:25 -05:00
2828a85656
* queryAllRows is the default mode for release * add a few more query() tests
v1.0
Sergey Tsalkov
2011-02-21 23:45:51 -05:00
2e07278d35
fix minor db bugs, add preliminary unit testing
Sergey Tsalkov
2011-02-21 01:14:36 -05:00
db0feccfd4
query() can default to buffered, unbuffered, or queryAllRows
Sergey Tsalkov
2011-02-09 13:32:49 -05:00