Skip to content

Commit be8b612

Browse files
committed
add escape() mention in the readme
1 parent 873077a commit be8b612

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

readme.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ MysqliDb -- Simple MySQLi wrapper and object mapper with prepared statements
1818
**[Subqueries](#subqueries)**
1919
**[EXISTS / NOT EXISTS condition](#exists--not-exists-condition)**
2020
**[Has method](#has-method)**
21-
**[Helper Functions](#helper-commands)**
21+
**[Helper Methods](#helper-methods)**
2222
**[Transaction Helpers](#transaction-helpers)**
2323

2424
### Installation
@@ -582,7 +582,7 @@ if($db->has("users")) {
582582
return "Wrong user/password";
583583
}
584584
```
585-
### Helper commands
585+
### Helper methods
586586
Reconnect in case mysql connection died:
587587
```php
588588
if (!$db->ping())
@@ -601,6 +601,12 @@ Check if table exists:
601601
if ($db->tableExists ('users'))
602602
echo "hooray";
603603
```
604+
605+
mysqli_real_escape_string() wrapper:
606+
```php
607+
$escaped = $db->escape ("' and 1=1");
608+
```
609+
604610
### Transaction helpers
605611
Please keep in mind that transactions are working on innoDB tables.
606612
Rollback transaction if insert fails:

0 commit comments

Comments
 (0)