1
1
MysqliDb -- Simple MySQLi wrapper and object mapper with prepared statements
2
2
<hr >
3
+
3
4
### Table of Contents
4
5
5
6
** [ Initialization] ( #initialization ) **
@@ -253,7 +254,7 @@ foreach ($logins as $login)
253
254
echo $login;
254
255
```
255
256
256
- ###Insert Data
257
+ ### Insert Data
257
258
You can also load .CSV or .XML data into a specific table.
258
259
To insert .csv data, use the following syntax:
259
260
``` php
@@ -278,7 +279,7 @@ $options = Array("fieldChar" => ';', "lineChar" => '\r\n', "linesToIgnore" => 1)
278
279
$db->loadData("users", "/home/john/file.csv", $options);
279
280
```
280
281
281
- ###Insert XML
282
+ ### Insert XML
282
283
To load XML data into a table, you can use the method ** loadXML** .
283
284
The syntax is smillar to the loadData syntax.
284
285
``` php
@@ -302,7 +303,7 @@ $path_to_file = "/home/john/file.xml";
302
303
$db->loadXML("users", $path_to_file, $options);
303
304
```
304
305
305
- ###Pagination
306
+ ### Pagination
306
307
Use paginate() instead of get() to fetch paginated result
307
308
``` php
308
309
$page = 1;
@@ -669,7 +670,7 @@ print_r ($products);
669
670
// SELECT u.login, p.productName FROM products p LEFT JOIN (SELECT * FROM t_users WHERE active = 1) u on p.userId=u.id;
670
671
```
671
672
672
- ###EXISTS / NOT EXISTS condition
673
+ ### EXISTS / NOT EXISTS condition
673
674
``` php
674
675
$sub = $db->subQuery();
675
676
$sub->where("company", 'testCompany');
@@ -775,7 +776,7 @@ print_r ($db->trace);
775
776
776
777
```
777
778
778
- ##Table Locking
779
+ ### Table Locking
779
780
To lock tables, you can use the ** lock** method together with ** setLockMethod** .
780
781
The following example will lock the table ** users** for ** write** access.
781
782
``` php
0 commit comments