ed0b6f040d
DB::$ssl now works even if DB::$ssl['key'] is NULL DB::$connect_flags allows access to flags passed to $mysqli->real_connect()
master
Sergey Tsalkov
2022-03-24 16:58:37 +00:00
f82f0cc208
add another queryWalk() test case make sure we're using $is_buffered=false for queryWalk() like we're supposed to
Sergey Tsalkov
2021-08-14 05:08:41 +00:00
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
Sergey Tsalkov
2021-08-14 05:02:27 +00:00
57b7527a46
fix bug in columnList(), add test
Sergey Tsalkov
2021-08-08 14:15:19 +00:00
e30c240d54
cleanup README, add note about $logfile
v2.4
dev
Sergey Tsalkov
2021-06-29 04:31:23 +00:00
13f249f200
update readme for new version
Sergey Tsalkov
2021-06-28 22:37:53 +00:00
30f3d9454a
DB::debugMode() is now deprecated (but still works) recommended debug system will use $logfile to log SQL to a file
Sergey Tsalkov
2021-06-23 21:23:20 +00:00
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"
Sergey Tsalkov
2021-06-23 03:05:22 +00:00
50fd6ed6d2
actually bring back deprecated methods, keep them for now to maintain backwards compatability
Sergey Tsalkov
2021-06-23 01:24:16 +00:00
6487873c68
new hook-based system for inserting callbacks to run before and after a query debugMode() now works through the new system
Sergey Tsalkov
2021-06-22 06:01:28 +00:00
ac626b0795
simplify parser a bit
Sergey Tsalkov
2021-06-20 20:53:31 +00:00
bac5503d5a
PHP 8 complains when trying to access closed $mysqli object, not sure how to test this properly I don't think we need this test very much, anyway
Sergey Tsalkov
2021-06-20 02:09:57 +00:00
42894b70ae
re-design query parser, new model has cleaner code and allows for %% escaping of % characters
Sergey Tsalkov
2021-06-18 20:50:25 +00:00
20c7acd8a4
DB::parse() lets you generate queries without running them
Sergey Tsalkov
2021-06-16 22:11:13 +00:00
c0f3a7f31d
restore to working in PHP 5.3
Sergey Tsalkov
2021-06-16 21:46:11 +00:00
1d2ad974f8
drop deprecated methods: queryOneRow (alias of queryFirstRow) queryOneList (alias of queryFirstList) queryOneColumn queryOneField
Sergey Tsalkov
2021-06-16 13:47:52 -07:00
2ea4c4c539
__callStatic() should have proper exception thrown if invalid method is used
Sergey Tsalkov
2021-06-16 13:47:08 -07:00
7c1f9bc226
DB::$usenull is removed, it makes no sense in a modern PHP context
Sergey Tsalkov
2021-06-15 21:44:14 -07:00
dab71efacd
DB::columnList() now returns details
Sergey Tsalkov
2021-06-15 21:39:19 -07:00
38545ddb3a
remove more PHP 5.2 cruft, we now require PHP 5.3+
Sergey Tsalkov
2021-06-15 21:28:14 -07:00
0fb0071314
use __callStatic() to clean up code a bit next release will require PHP 5.3+ (up from 5.2)
Sergey Tsalkov
2021-06-15 13:50:13 -07:00
e8c19ca2f8
clean up update() and delete(), both will now be compatible with named and numbered arguments resolves#54
v2.3.1
Sergey Tsalkov
2020-07-10 01:13:31 +00:00
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
Sergey Tsalkov
2020-07-10 00:00:27 +00:00
226a08611f
small test fix to pass on PHP 7.3
Sergey Tsalkov
2020-07-09 00:12:03 +00:00
031901f8b6
Add a warning to prevent accidents (#65)
wadih
2020-07-08 22:19:59 -04:00
30c7343bae
Pre sql handler (#59)
Magnus Månsson
2020-02-07 05:32:29 +01:00
b99ed41c94
Implemented param char ssb and sse (#58)
Magnus Månsson
2020-02-07 05:20:53 +01:00
18d9ab2337
make sure insertOrReplace() gets valid input, throw an error if it doesn't
Sergey Tsalkov
2020-01-27 08:45:36 -08:00
027681b350
bugfix: strtolower() doesn't work with certain locales, so work around that
Sergey Tsalkov
2020-01-24 15:42:43 -08:00
67b24c916d
additional test with %li0
Sergey Tsalkov
2014-10-27 01:49:53 +00:00
29c8e42a09
escape and sanitize could be occasionally useful as public functions
Sergey Tsalkov
2014-10-27 01:25:31 +00:00
6fdcffab24
few minor cleanups to last commit
Sergey Tsalkov
2014-10-27 01:23:20 +00:00
e0660a9368
%? no longer handles arrays and hashes for security purposes those are moved into %l?, %ll?, %hc, %ha, %ho for different uses
Sergey Tsalkov
2014-10-26 07:20:51 +00:00
0474a41a56
functions generally shouldn't keep going after a nonsql error
Sergey Tsalkov
2014-10-26 03:11:14 +00:00
1fe2fdea16
when an instance of MeekroDB is created, its default settings will be those of the static instance
Sergey Tsalkov
2014-10-26 01:57:20 +00:00
83256937b8
make some useful functions public
Sergey Tsalkov
2014-08-25 20:20:39 -07:00
1d797b306e
bugfix: insert/update type functions don't break when using a param_char other than %
Sergey Tsalkov
2014-06-14 02:41:06 +00:00
7c819bfc24
the connect_options variable lets you set mysqli_options, like a connection timeout
Sergey Tsalkov
2014-06-14 01:58:51 +00:00
1d147e169a
ssl support (still untested)
Sergey Tsalkov
2014-06-14 01:31:32 +00:00
391702700d
clean up static class init syntax a bit
Sergey Tsalkov
2014-06-14 01:06:05 +00:00
37fd169be3
minor bugfix: don't assume that the query results for queryFirstRow() or queryFirstList() will be an array (can also be a bool)
Sergey Tsalkov
2014-06-14 00:27:38 +00:00
7c5c03c576
minor cleanups
Sergey Tsalkov
2014-06-13 21:19:10 +00:00
a0a2f702e2
bugfix: don't crash if nested transactions are enabled, and the first command issued is a start transaction
Sergey Tsalkov
2014-03-31 01:50:10 -07:00
2707bcba7d
minor bugfix: don't drop identical query components in WhereClause (thanks Alexander!)
Sergey Tsalkov
2013-12-06 11:17:54 -08:00
7b0da839de
add yet another test for this weird bug people are reporting tests *still* all pass, I can't reproduce the bug
Sergey Tsalkov
2013-11-08 14:14:46 -08:00
1d51c2b674
add additional test case for a reported bug where '%s' in data is parsed as a query placeholder I can't reproduce the bug
Sergey Tsalkov
2013-09-13 22:35:34 -07:00
253e803160
WhereClause can't have a __toString() method anymore because of how it's handled in combinatino with preparseQueryParams() now
Sergey Tsalkov
2013-06-04 23:17:18 -07:00
e61d66fdf8
new DateTime() can be used with insert-like commands, and with %? as well
Sergey Tsalkov
2013-06-02 19:45:44 -07:00
e9a55de0b4
DB::$usenull param can be used to decide whether insert()-like commands insert NULL or empty string for NULL
Sergey Tsalkov
2013-06-02 19:22:14 -07:00
9e4cbc28c1
%t and %lt variables can be used to hold a datetime, which will be formatted to mysql standards
Sergey Tsalkov
2013-06-02 19:10:28 -07:00
b6397a719c
merge freeResult and checkError functions back into queryHelper() since they're only used once
Sergey Tsalkov
2013-06-02 17:45:04 -07:00
65ec35c591
modify WhereClause to hold off on evaluating parameters preparseQueryParams will now receive full WhereClause object and evaluate there
Sergey Tsalkov
2013-06-02 15:46:46 -07:00
1d61a11098
add %? autodetection parameter, simplify functions such as insert() and update() to rely on it
Sergey Tsalkov
2013-06-02 15:01:43 -07:00
ecd5fe190f
clean up query parsing code -- will be necessary for transition to prepared statement approach
Sergey Tsalkov
2013-06-02 12:49:01 -07:00
e94f75fe2a
DB::disconnect() allows easy disconnecting from mysql
Sergey Tsalkov
2013-03-19 12:02:47 -07:00