File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff 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
586586Reconnect in case mysql connection died:
587587``` php
588588if (!$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
605611Please keep in mind that transactions are working on innoDB tables.
606612Rollback transaction if insert fails:
You can’t perform that action at this time.
0 commit comments