Skip to content

Commit 034d43a

Browse files
committed
Using correct backticks
1 parent 8064072 commit 034d43a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/docs/d1/build-with-d1/d1-client-api.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ D1 client API supports prepared and static statements. Best practice is to use p
1414
Below is an example of a prepared statement:
1515

1616
```js
17-
const stmt = db.prepare("SELECT * FROM users WHERE name = ?1").bind("Joe");
17+
const stmt = db.prepare(`SELECT * FROM users WHERE name = ?1`).bind("Joe");
1818
```
1919

2020
However, if you still choose to use a static statement you can use the following as an example:
@@ -30,7 +30,7 @@ You can pass multiple queries through `db.prepare()`.
3030
You can pass multiple queries into a single `.prepare()` statement. Simply delineate each query with a semi-colon.
3131

3232
```js
33-
const stmt = db.prepare("SELECT * FROM users WHERE name = "Anthony"; SELECT * FROM users WHERE name = ?1").bind("Joe")
33+
const stmt = db.prepare(`SELECT * FROM users WHERE name = "Anthony"; SELECT * FROM users WHERE name = ?1`).bind("Joe")
3434
```
3535

3636
Note the following restrictions when passing multiple queries:

0 commit comments

Comments
 (0)