Skip to content

Commit ecf411b

Browse files
committed
Readme DoubleBind
1 parent 1c0a00c commit ecf411b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,17 @@ $Bindings = [
303303
'from_table' => 'table'
304304
];
305305

306-
$statement = $db->selectAsync($select, $Bindings);
306+
$statement = $db->selectAsync("SELECT FROM {table} WHERE datetime=:datetime limit {limit}", $Bindings);
307+
308+
// Double bind in {KEY}
309+
$keys=[
310+
'A'=>'{B}',
311+
'B'=>':C',
312+
'C'=>123,
313+
'Z'=>[':C',':B',':C']
314+
];
315+
$this->client->selectAsync('{A} :Z', $keys)->sql() // == "123 ':C',':B',':C' FORMAT JSON",
316+
307317

308318
```
309319

0 commit comments

Comments
 (0)