SQL Yoga version 1.1.0 build 4 :: Visit website

Printer friendly version

command sqlquery_create

Creates a record in a table.

command sqlquery_create pTable, pParamsA
Simple parameter. pTable The name of the table to create the record. If you need to pass in a Database or Connection object that isn't the default then pass in SQL Query object.
Simple parameter. pParamsA An array of key value pairs used to create the record.

This command will perform a CREATE based on the parameters you pass in.

## Create lesson 
put 0 into theValuesA["draft"]
sqlquery_create "lessons", theValuesA
put the result into theError

An alternative to passing in an array for pParamsA is to pass in combinations of "key", "value" parameters. For example, the following code would set the draft field in the database to 0.

sqlquery_create "lessons", "draft", 0 


Error string in 'the result', number of affected rows in 'it'.