SQL Yoga version 1.1.0 build 4 :: Visit website

Printer friendly version

function sqlrecord_createObject()

Creates a SQL Record object (represented as an array) for a table with all columns initialized to their default values.

function sqlrecord_createObject pTable, [pConnection], [pDBKey]
Simple parameter. pTable Name of the table to create the Record array for.
OptionalSimple parameter. [pConnection] Name of the connection to attach the SQL Record to. Default is the default connection for the database object.
OptionalSimple parameter. [pDBKey] The name of the database object to attach the SQL Record object to. Default is name returned by sqlyoga_getDefaultDatabase().

A SQL Record object represents a table record. An array is used to hold the object values. You should always use sqlrecord_set to
update values in this array as there are special keys in the array that get updated when setting values. In addition, sqlrecord_get/set will throw errors if you try to set the value of a column not in the table which can help catch bugs early on.


Record array

See also