Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PHP-MySQLi-Database-Class
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
PHP-MySQLi-Database-Class
Commits
2a0ffc22
Commit
2a0ffc22
authored
Aug 02, 2017
by
Noneatme
Committed by
Alexander Butenko
Aug 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed readme headlines (#658)
- Fixed damaged headlines where spaces were missing
parent
8e750e65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
readme.md
readme.md
+6
-5
No files found.
readme.md
View file @
2a0ffc22
MysqliDb -- Simple MySQLi wrapper and object mapper with prepared statements
<hr>
### Table of Contents
**[Initialization](#initialization)**
...
...
@@ -253,7 +254,7 @@ foreach ($logins as $login)
echo
$login
;
```
###Insert Data
###
Insert Data
You can also load .CSV or .XML data into a specific table.
To insert .csv data, use the following syntax:
```
php
...
...
@@ -278,7 +279,7 @@ $options = Array("fieldChar" => ';', "lineChar" => '\r\n', "linesToIgnore" => 1)
$db
->
loadData
(
"users"
,
"/home/john/file.csv"
,
$options
);
```
###Insert XML
###
Insert XML
To load XML data into a table, you can use the method
**loadXML**
.
The syntax is smillar to the loadData syntax.
```
php
...
...
@@ -302,7 +303,7 @@ $path_to_file = "/home/john/file.xml";
$db
->
loadXML
(
"users"
,
$path_to_file
,
$options
);
```
###Pagination
###
Pagination
Use paginate() instead of get() to fetch paginated result
```
php
$page
=
1
;
...
...
@@ -669,7 +670,7 @@ print_r ($products);
// SELECT u.login, p.productName FROM products p LEFT JOIN (SELECT * FROM t_users WHERE active = 1) u on p.userId=u.id;
```
###EXISTS / NOT EXISTS condition
###
EXISTS / NOT EXISTS condition
```php
$sub = $db->subQuery();
$sub->where("company", 'testCompany');
...
...
@@ -775,7 +776,7 @@ print_r ($db->trace);
```
##Table Locking
##
#
Table Locking
To lock tables, you can use the **lock** method together with **setLockMethod**.
The following example will lock the table **users** for **write** access.
```php
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment