Skip to content

Commit 48042c7

Browse files
committed
Wording update
1 parent 6b0fba8 commit 48042c7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/content/docs/d1/worker-api/prepared-statements.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ const stmt = env.DB.prepare("SELECT * FROM Customers WHERE CompanyName = ?").bin
6464
D1 API supports static statements. Static statements are SQL statements where the variables have been hard coded. When writing a static statement, you manually type the variable within the statement string.
6565

6666
:::note[Advantages of prepared statements]
67-
The recommended approach is to bind parameters to create a prepared statement (which are precompiled objects used by the database) to run the SQL. Prepared statements lead to faster overall execution when compared to static statements, and prevent SQL injection attacks.
67+
The recommended approach is to bind parameters to create a prepared statement (which are precompiled objects used by the database) to run the SQL. Binding parameters using [`bind()`](/d1/worker-api/prepared-statements/#bind) to prepared statements allows you to efficiently reuse the prepared statement, and prevents SQL injection attacks.
6868

69-
Additionally, if you wish to execute the same statement multiple times, you can reuse prepared statements and avoid recompiling the same statement multiple times.
7069
:::
7170

7271
Example of a prepared statement with dynamically bound value:

0 commit comments

Comments
 (0)