Skip to content

Commit 321b9f1

Browse files
committed
fixed readme
1 parent 182e112 commit 321b9f1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,21 @@
22

33
Simple SQL escape and format
44

5+
6+
## Escaping sql values
7+
8+
```
9+
//Format
10+
sql := sqlstring.Format("select * from users where name=? and age=? limit ?,?", "t'est", 10, 10, 10)
11+
12+
fmt.Printf("sql: %s",sql)
13+
14+
//Escape
15+
sql = "select * from users WHERE name = " + sqlstring.Escape(name);
16+
fmt.Printf("sql: %s",sql)
17+
18+
```
19+
20+
## License
21+
22+
MIT

0 commit comments

Comments
 (0)