Sergey Tsalkov
ed0b6f040d
DB::$ssl now works even if DB::$ssl['key'] is NULL
...
DB::$connect_flags allows access to flags passed to $mysqli->real_connect()
Resolves #82
Resolves #83
2022-03-24 16:58:37 +00:00
Sergey Tsalkov
7febdbd1f5
since queryRaw() is deprecated, it was a mistake to change its behavior
...
return it to using $is_buffered=true, and restore queryRawUnbuf() for $is_buffered=false
both queryRaw() and queryRawUnbuf() are deprecated, and it's recommended that you use queryWalk() instead
2021-08-14 05:02:27 +00:00
Sergey Tsalkov
57b7527a46
fix bug in columnList(), add test
2021-08-08 14:15:19 +00:00
Sergey Tsalkov
d944430401
drop DBHelper
2021-06-27 05:35:28 +00:00
Sergey Tsalkov
a10b76b2de
cleanup some error-checking code
...
add lots more tests for that code
2021-06-27 03:17:47 +00:00
Sergey Tsalkov
50ed9675f3
fix pre_parse and pre_run hooks
...
add testing for all hooks (roll into previous ErrorTest group)
2021-06-26 00:52:37 +00:00
Sergey Tsalkov
1724b7276b
cleanup MeekroDBWalk a bit
2021-06-25 23:48:44 +00:00
Sergey Tsalkov
aad5cbbbac
cleanup and better test queryWalk()
2021-06-25 18:23:59 +00:00
Sergey Tsalkov
5108480e03
drop unused code
2021-06-25 17:40:41 +00:00
Sergey Tsalkov
15f40efe5d
add DB::queryWalk() -- still untested
...
add DB::lastQuery() (with tests)
2021-06-24 03:05:46 +00:00
Sergey Tsalkov
30f3d9454a
DB::debugMode() is now deprecated (but still works)
...
recommended debug system will use $logfile to log SQL to a file
2021-06-23 21:23:20 +00:00
Sergey Tsalkov
dc21f646af
DB::$logfile can be used to log all queries to either a resource or a file
...
DB::debugMode() is now a shorthand for "DB::$logfile = STDOUT"
2021-06-23 03:05:22 +00:00
Sergey Tsalkov
50fd6ed6d2
actually bring back deprecated methods, keep them for now to maintain backwards compatability
2021-06-23 01:27:03 +00:00
Sergey Tsalkov
6487873c68
new hook-based system for inserting callbacks to run before and after a query
...
debugMode() now works through the new system
2021-06-22 06:01:28 +00:00
Sergey Tsalkov
ac626b0795
simplify parser a bit
2021-06-20 20:53:31 +00:00
Sergey Tsalkov
42894b70ae
re-design query parser, new model has cleaner code and allows for %% escaping of % characters
2021-06-20 03:12:15 +00:00
Sergey Tsalkov
20c7acd8a4
DB::parse() lets you generate queries without running them
2021-06-20 02:32:56 +00:00
Sergey Tsalkov
c0f3a7f31d
restore to working in PHP 5.3
2021-06-20 02:32:56 +00:00
Sergey Tsalkov
1d2ad974f8
drop deprecated methods:
...
queryOneRow (alias of queryFirstRow)
queryOneList (alias of queryFirstList)
queryOneColumn
queryOneField
2021-06-20 02:32:56 +00:00
Sergey Tsalkov
2ea4c4c539
__callStatic() should have proper exception thrown if invalid method is used
2021-06-20 02:32:56 +00:00
Sergey Tsalkov
7c1f9bc226
DB::$usenull is removed, it makes no sense in a modern PHP context
2021-06-20 02:32:56 +00:00
Sergey Tsalkov
dab71efacd
DB::columnList() now returns details
2021-06-20 02:28:26 +00:00
Sergey Tsalkov
0fb0071314
use __callStatic() to clean up code a bit
...
next release will require PHP 5.3+ (up from 5.2)
2021-06-20 02:26:21 +00:00
Sergey Tsalkov
e8c19ca2f8
clean up update() and delete(), both will now be compatible with named and numbered arguments
...
resolves #54
2020-07-10 01:13:31 +00:00
Sergey Tsalkov
fa46824df1
get_class_vars() is broken in PHP 7.4 with opcache enabled, so stop using it
...
looks like this fix actually works with PHP 5.2 after all, so not dropping backwards compatibility
resolves #64
2020-07-10 00:00:27 +00:00
Magnus Månsson
30c7343bae
Pre sql handler ( #59 )
...
Add a pre_sql_handler
2020-02-06 22:32:29 -06:00
Magnus Månsson
b99ed41c94
Implemented param char ssb and sse ( #58 )
2020-02-06 22:20:53 -06:00
Sergey Tsalkov
18d9ab2337
make sure insertOrReplace() gets valid input, throw an error if it doesn't
2020-01-27 08:45:36 -08:00
Sergey Tsalkov
027681b350
bugfix: strtolower() doesn't work with certain locales, so work around that
2020-01-24 15:42:43 -08:00
Sergey Tsalkov
8e19d9d6c3
bugfix in WhereClause: negate didn't wrap multiple clauses in extra parens
...
Fixes #41
2017-10-15 19:10:35 +00:00
Sergey Tsalkov
b41887505d
fix to last commit
2017-10-15 17:56:10 +00:00
Mike Damm
cb10e249b2
Add support for custom unix sockets ( #49 )
...
Add support for custom unix sockets
2017-10-08 21:04:22 -07:00
Sergey Tsalkov
8bef6d6618
fix bug with hhvm
2015-03-04 00:43:54 +00:00
Sergey Tsalkov
da46a1eacc
DB::insert() and the like should use __toString() value for objects whenever possible
2014-11-27 01:30:42 +00:00
Sergey Tsalkov
076a7e2b9b
oops
2014-10-27 02:02:32 +00:00
Sergey Tsalkov
29c8e42a09
escape and sanitize could be occasionally useful as public functions
2014-10-27 02:00:21 +00:00
Sergey Tsalkov
6fdcffab24
few minor cleanups to last commit
2014-10-27 02:00:21 +00:00
Sergey Tsalkov
e0660a9368
%? no longer handles arrays and hashes for security purposes
...
those are moved into %l?, %ll?, %hc, %ha, %ho for different uses
2014-10-27 02:00:21 +00:00
Sergey Tsalkov
0474a41a56
functions generally shouldn't keep going after a nonsql error
2014-10-27 02:00:21 +00:00
Sergey Tsalkov
1fe2fdea16
when an instance of MeekroDB is created, its default settings will be those of the static instance
2014-10-27 02:00:20 +00:00
Sergey Tsalkov
83256937b8
make some useful functions public
2014-08-25 20:20:39 -07:00
Sergey Tsalkov
eb36858f1a
columnList() properly escapes table names
2014-06-16 22:40:22 +00:00
Sergey Tsalkov
1d797b306e
bugfix: insert/update type functions don't break when using a param_char other than %
2014-06-14 02:41:06 +00:00
Sergey Tsalkov
7c819bfc24
the connect_options variable lets you set mysqli_options, like a connection timeout
2014-06-14 01:58:51 +00:00
Sergey Tsalkov
1d147e169a
ssl support (still untested)
2014-06-14 01:31:32 +00:00
Sergey Tsalkov
391702700d
clean up static class init syntax a bit
2014-06-14 01:06:05 +00:00
Sergey Tsalkov
37fd169be3
minor bugfix: don't assume that the query results for queryFirstRow() or queryFirstList() will be an array (can also be a bool)
2014-06-14 00:27:38 +00:00
Sergey Tsalkov
a0a2f702e2
bugfix: don't crash if nested transactions are enabled, and the first command issued is a start transaction
2014-03-31 01:50:10 -07:00
Sergey Tsalkov
2707bcba7d
minor bugfix: don't drop identical query components in WhereClause (thanks Alexander!)
2013-12-06 11:17:54 -08:00
Brian Cash
26fcce650a
Passes mysqli error code to MeekroDBException
2013-06-22 11:56:01 -07:00