missing bits
[mdref/mdref-pq] / pq / Connection / quote.md
1 # string pq\Connection::quote(string $payload)
2
3 Quote a string for safe use in a query.
4 The result is truncated at any zero byte and wrapped in single quotes.
5
6 > ***NOTE:***
7 Beware of matching character encodings.
8
9 ## Params:
10
11 * string $payload
12 The payload to quote for use in a query.
13
14 ## Returns:
15
16 * string, a single-quote wrapped string safe for literal use in a qurey.
17 * FALSE, if quoting fails.
18
19 # Throws:
20
21 * pq\Exception\BadMethodCallException