Skip to content

Commit c872dce

Browse files
committed
update docs
1 parent 9d5e84c commit c872dce

File tree

3 files changed

+152
-147
lines changed

3 files changed

+152
-147
lines changed

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"VARBINARY",
1919
"VARBIT",
2020
"VARCHAR",
21+
"autoload",
2122
"ezmysqli",
2223
"ezpdo",
2324
"ezpgsql",
@@ -27,6 +28,7 @@
2728
"filebase",
2829
"isfile",
2930
"postgresql",
31+
"repo",
3032
"sqlserver",
3133
"tomssql",
3234
"tosql",

CHANGELOG.md

Lines changed: 105 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1-
**Change Log**
1+
Change Log
22
====
3+
34
3.0.9 - 3.1.4
5+
46
- added SQL Join shortcut methods `innerJoin`, `leftJoin`, `rightJoin`, `fullJoin`, and an `limit` shortcut method.
57
- added SQL table creation shortcut methods `create`, `drop`, `alter`, and an `column` method to handle the schema
68
- added support for secure database connections.
79
- changed most of the public properties to protected.
810

9-
3.08 - Merged fork https://github.com/sjstoelting/ezSQL3 to be current with this repo.
10-
* Added/Updated PHPunit tests, some marked as incomplete or not fully implemented, SQL drivers not loaded will be skipped.
11-
* Refactor class code to use `spl_autoload_register`.
12-
Simply using `require_once "ez_sql_loader.php";` then `$database = new database_driver_class;`. This will allow multi SQLdb to be loaded if need be.
13-
* Added methods `create_select`, `insert_select`, `update`, `insert`, `replace`, `delete`, and `selecting` an alias for select.
11+
3.08 - Merged fork https://github.com/sjstoelting/ezSQL3 to be current with this repo.
12+
13+
- Added/Updated PHPunit tests, some marked as incomplete or not fully implemented, SQL drivers not loaded will be skipped.
14+
- Refactor class code to use `spl_autoload_register`.
15+
Simply using `require_once "ez_sql_loader.php";` then `$database = new ez_driver_class;`. This will allow multi SQLdb to be loaded if need be.
16+
- Added methods `create_select`, `insert_select`, `update`, `insert`, `replace`, `delete`, and `selecting` an alias for select.
1417
These are part of the new ezQuery SQL builder class. They are shortcut calls, these new methods will create proper SQL statements, from supplied arguments variable or array, prevent injections, then execute guery, in case of `selecting` execute get_results.
15-
* Added many additional functions to support ezQuery builder and to easily process SQL prepare statements. Supplied arguments will be replace with necessary placeholder and values added to parameter array.
16-
* All new methods has been fully PHPunit tested under current supported database systems, and should be able to handle most use cases as is.
18+
- Added many additional functions to support ezQuery builder and to easily process SQL prepare statements. Supplied arguments will be replace with necessary placeholder and values added to parameter array.
19+
- All new methods has been fully PHPunit tested under current supported database systems, and should be able to handle most use cases as is.
1720

18-
```
21+
```md
1922
ezSQL3 - From Author: Stefanie Janine Stoelting - http://stefanie-stoelting.de
2023

2124
News about ezSQL3 are available at http://stefanie-stoelting.de/ezsql3-news.html
@@ -38,15 +41,15 @@ News about ezSQL3 are available at http://stefanie-stoelting.de/ezsql3-news.html
3841

3942
2.14 - Added sybase connector by Muhammad Iyas
4043

41-
2.13 - Support for transations. See: http://stackoverflow.com/questions/8754215/ezsql-with-multiple-queries/8781798
44+
2.13 - Support for transactions. See: http://stackoverflow.com/questions/8754215/ezsql-with-multiple-queries/8781798
4245

4346
2.12 - Added $db->get_set() - Creates a SET nvp sql string from an associative array (and escapes all values)
4447

45-
2.11 - Fixed $db->insert_id in postgress version
48+
2.11 - Fixed $db->insert_id in postgres version
4649

47-
2.10 - Added isset($this->dbh) check to orcale version
50+
2.10 - Added isset($this->dbh) check to oracle version
4851

49-
2.09 - Fixed issues with mysql_real_escape_string not woirkign if no connection
52+
2.09 - Fixed issues with mysql_real_escape_string not working if no connection
5053
(Thanks to Nicolas Vannier)
5154

5255
2.08 - Re-added timer functions that seemed to have disappeared
@@ -70,14 +73,14 @@ News about ezSQL3 are available at http://stefanie-stoelting.de/ezsql3-news.html
7073
- Errors are being piped through trigger_error
7174
(using standard PHP error logging)
7275

73-
- Abstracted error messages (enabling future translation)
76+
- Abstracted error messages (enabling future translation)
7477

75-
- Upgraded $db->query error return functionality
78+
- Upgraded $db->query error return functionality
7679

77-
- Added $db->systdate function to abstract mySQL NOW()
78-
and Oracle SYSDATE
80+
- Added $db->systdate function to abstract mySQL NOW()
81+
and Oracle SYSDATE
7982

80-
Note: For other DB Types please use version 1.26
83+
Note: For other DB Types please use version 1.26
8184

8285
1.26 - Update (All)
8386

@@ -87,7 +90,7 @@ News about ezSQL3 are available at http://stefanie-stoelting.de/ezsql3-news.html
8790

8891
1.25 - Update (mySQL/Oracle)
8992

90-
- Optimised $db->query function in both mySQL and Oracle versions.
93+
- Optimise $db->query function in both mySQL and Oracle versions.
9194
Now the return value is working 'as expected' in ALL cases so you
9295
are always safe using:
9396

@@ -156,159 +159,159 @@ News about ezSQL3 are available at http://stefanie-stoelting.de/ezsql3-news.html
156159

157160
1.21 - Update (All Versions)
158161

159-
- Now 'replace' really does return an insert id..
160-
(the 1.19 fix did not complete the job. Doh!)
162+
- Now 'replace' really does return an insert id..
163+
(the 1.19 fix did not complete the job. Doh!)
161164

162165
1.20 - Update (New Version)
163166

164-
- C++ SQLite version added. Look at ez_demo.cpp.
165-
(thanks Brennan Falkner)
167+
- C++ SQLite version added. Look at ez_demo.cpp.
168+
(thanks Brennan Falkner)
166169

167170
1.19 - Update (All Versions)
168171

169-
- Fixed bug where any string containing the word 'insert',
170-
'delete' or 'update' (where those words were not the actual
171-
query) was causing unexpected results (thx Simon Willison).
172+
- Fixed bug where any string containing the word 'insert',
173+
'delete' or 'update' (where those words were not the actual
174+
query) was causing unexpected results (thx Simon Willison).
172175

173-
The fix was to alter the regular expression to only match
174-
queries containing those words at the beginning of the query
175-
(with optional whitespace allowed before the words)
176+
The fix was to alter the regular expression to only match
177+
queries containing those words at the beginning of the query
178+
(with optional whitespace allowed before the words)
176179

177-
i.e.
180+
i.e.
178181

179-
THIS: preg_match("/$word /",strtolower($query))
180-
TO THIS: preg_match("/^\\s*$word /",strtolower($query))
182+
THIS: preg_match("/$word /", strtolower($query))
183+
TO THIS: preg_match("/^\\s*$word /", strtolower($query))
181184

182-
- Added new sql word 'replace' to the above match pattern
183-
so that the $db->insert_id would be also be populated
184-
on 'replace' queries (thx Rolf Dahl)
185+
- Added new sql word 'replace' to the above match pattern
186+
so that the $db->insert_id would be also be populated
187+
on 'replace' queries (thx Rolf Dahl)
185188

186189
1.18 - Update (All Versions)
187190

188-
- Added new SQLite version (thanks Brennan Falkner)
191+
- Added new SQLite version (thanks Brennan Falkner)
189192

190-
- Fixed new bug that was introduced with bug fix 1.14
191-
false was being returned on successful insert update etc.
192-
now it is true
193+
- Fixed new bug that was introduced with bug fix 1.14
194+
false was being returned on successful insert update etc.
195+
now it is true
193196

194197
1.17 - Update (All Versions)
195198

196-
- New MS-SQL version added (thanks to Tom De Bruyne)
197-
- Made the donation request 'less annoying' by making it more subtle!
199+
- New MS-SQL version added (thanks to Tom De Bruyne)
200+
- Made the donation request 'less annoying' by making it more subtle!
198201

199202
1.16 - Update (All Versions)
200203

201-
- Added new function $db->escape()
202-
Formats a string correctly to stop accidental
203-
mal formed queries under all PHP conditions
204+
- Added new function $db->escape()
205+
Formats a string correctly to stop accidental
206+
mal formed queries under all PHP conditions
204207

205208
1.15 - Bug fixes
206209

207-
- (Postgress)
208-
$this->result = false; was in the wrong place.
209-
Fixed! Thanks (Carlos Camiña García)
210+
- (Postgres)
211+
$this->result = false; was in the wrong place.
212+
Fixed! Thanks (Carlos Camiña García)
210213

211-
- (all versions)
212-
Pesky get_var was still returning null instead of 0 in
213-
certain cases. Bug fix of !== suggested by Osman
214+
- (all versions)
215+
Pesky get_var was still returning null instead of 0 in
216+
certain cases. Bug fix of !== suggested by Osman
214217

215218
1.14 - Bug fixes
216219

217-
- (all versions)
218-
Added !='' into the conditional return of get_var.
219-
because if the result was the number 0 it was not returning anything
220+
- (all versions)
221+
Added !='' into the conditional return of get_var.
222+
because if the result was the number 0 it was not returning anything
220223

221-
- (mySQL / Interbase / Postgress)
222-
Added $this->result = false; if insert / update / delete
223-
because it was causing mysql retrieval errors that no one
224-
knew about due to the @ signs.
224+
- (mySQL / Interbase / Postgres)
225+
Added $this->result = false; if insert / update / delete
226+
because it was causing mysql retrieval errors that no one
227+
knew about due to the @ signs.
225228

226229
1.13 - Update (All Versions)
227230

228-
- Swapped 2nd and 3rd argument order.
229-
- From.. get_row(query, int row offset, output type)
230-
- To.... get_row(query, output type, int row offset)
231+
- Swapped 2nd and 3rd argument order.
232+
- From.. get_row(query, int row offset, output type)
233+
- To.... get_row(query, output type, int row offset)
231234

232235
1.12 - Update (All Versions)
233236

234-
- Tweaked the new hide/show error code
235-
- Made sure the $this->show_errors was always initialised
236-
- $db->query() function now returns false if there was an SQL error.
237-
So that you can now do the following when you hide errors.
237+
- Tweaked the new hide/show error code
238+
- Made sure the $this->show_errors was always initialized
239+
- $db->query() function now returns false if there was an SQL error.
240+
So that you can now do the following when you hide errors.
238241

239-
if ( $db->query("BAD SYNTAX") )
240-
{
241-
echo "Bad Query";
242-
}
242+
if ( $db->query("BAD SYNTAX") )
243+
{
244+
echo "Bad Query";
245+
}
243246

244247
1.11 - Update (All Versions)
245248

246-
- added $db->hide_errors();
247-
- added $db->show_errors();
248-
- added global array $EZSQL_ERROR;
249+
- added $db->hide_errors();
250+
- added $db->show_errors();
251+
- added global array $EZSQL_ERROR;
249252

250253
1.10 - Fix (mySQL)
251254

252-
- Insist that mysql_insert_id(); uses $this->dbh.
255+
- Insist that mysql_insert_id(); uses $this->dbh.
253256

254257
1.09 - Bug Fix
255258

256-
- Oracle version had the wrong number of parameters in the
257-
$db = new db(etc,etc,etc,etc) part.
259+
- Oracle version had the wrong number of parameters in the
260+
$db = new db(etc,etc,etc,etc) part.
258261

259-
- Also added var $vardump_called; to all versions.
262+
- Also added var $vardump_called; to all versions.
260263

261264
1.08 - Bug Fix
262265

263-
- Michael fixed the select function in PostgreSQL version.
266+
- Michael fixed the select function in PostgreSQL version.
264267

265268
1.07 - Bug Fix
266269

267-
- Added var $debug_called; to all versions.
270+
- Added var $debug_called; to all versions.
268271

269272
1.06 - Update
270273

271-
- Fixed Bug In Oracle Version where an insert was
272-
causing an error with OCIFetch
273-
- New PostgreSQL Version Added by Michael Paesold ([email protected])
274+
- Fixed Bug In Oracle Version where an insert was
275+
causing an error with OCIFetch
276+
- New PostgreSQL Version Added by Michael Paesold ([email protected])
274277

275278
1.05 - Bug Fix (mySQL)
276279

277-
- Removed repeated piece of code.
280+
- Removed repeated piece of code.
278281

279282
1.04 - Update
280283

281-
- $db->num_rows - variable added (All Versions)
282-
- $db->rows_affected - variable added ( mySQL / Oracle )
283-
- New InterBase/FireBase Version Added by LLCedar ([email protected])
284+
- $db->num_rows - variable added (All Versions)
285+
- $db->rows_affected - variable added ( mySQL / Oracle )
286+
- New InterBase/FireBase Version Added by LLCedar ([email protected])
284287

285288
1.03 - Update (All Versions)
286289

287-
Enhancements to vardump..
290+
Enhancements to vardump..
288291

289-
- Added display variable type
290-
- If no value display No Value / False
291-
- Added this readme file
292+
- Added display variable type
293+
- If no value display No Value / False
294+
- Added this readme file
292295

293296
1.02 - Update (mySQL version)
294297

295-
Added $db->insert_id to
298+
- Added $db->insert_id to
296299

297300
1.01 - New Version
298301

299-
Oracle 8 Version as below
302+
- Oracle 8 Version as below
300303

301304
1.00 - Initial Release
302305

303-
Functions..
304-
305-
- $db->get_results - get multiple row result set from the database (or previously cached results)
306-
- $db->get_row -- get one row from the database (or previously cached results)
307-
- $db->get_col - get one column from query (or previously cached results) based on column offset
308-
- $db->get_var -- get one variable, from one row, from the database (or previously cached results)
309-
- $db->query -- send a query to the database (and if any results, cache them)
310-
- $db->debug - print last sql query and returned results (if any)
311-
- $db->vardump - print the contents and structure of any variable
312-
- $db->select -- select a new database to work with
313-
- $db->get_col_info - get information about one or all columns such as column name or type
314-
- $db = new db -- Initiate new db object.
306+
Functions..
307+
308+
- $db->get_results - get multiple row result set from the database (or previously cached results)
309+
- $db->get_row -- get one row from the database (or previously cached results)
310+
- $db->get_col - get one column from query (or previously cached results) based on column offset
311+
- $db->get_var -- get one variable, from one row, from the database (or previously cached results)
312+
- $db->query -- send a query to the database (and if any results, cache them)
313+
- $db->debug - print last sql query and returned results (if any)
314+
- $db->vardump - print the contents and structure of any variable
315+
- $db->select -- select a new database to work with
316+
- $db->get_col_info - get information about one or all columns such as column name or type
317+
- $db = new db -- Initiate new db object.

0 commit comments

Comments
 (0)