add an example for a prepared sql query (#621)

An example sql query for the given parameter example would help users to understand how they could use prepared statements.
This commit is contained in:
arneman 2020-04-03 23:13:10 +02:00 committed by GitHub
parent 7c759e10dd
commit 3c4337f238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,8 @@
&nbsp;&nbsp;&nbsp;&nbsp;$name:"John Doe"<br />
}</code><br />
Parameter object names must match parameters set up in the Prepared Statement. If you get the error <code>SQLITE_RANGE: bind or column index out of range</code>
be sure to include $ on the parameter object key.</p>
be sure to include $ on the parameter object key.<br />
The sql query for the example above could be: <code>insert into user_table (user_id, user) VALUES ($id, $name);</code></p>
<p>Using any SQL Query, the result is returned in <code>msg.payload</code></p>
<p>Typically the returned payload will be an array of the result rows, (or an error).</p>
<p>You can load sqlite extensions by inputting a <code>msg.extension</code> property containing the full