SQL Yoga version 1.1.0 build 4 :: Visit website

Printer friendly version

command sqlrecord_link

Links two records represented by pRecord1A and pRecord2A together in the database.

command sqlrecord_link @pRecord1A, @pRecord2A
Parameters
TypeNameDescription
Simple parameter. @pRecord1A The primary Record array.
Simple parameter. @pRecord2A The Record array that should be linked to pRecord1A.
Description

This handler will link two records together if you have defined a relationship between the two tables. You just need to fill in the column keys for each record that are
needed to uniquely identify them.

put sqlrecord_createObject("lessons") into theLessonA 
sqlrecord_set theLessonA, "id", 2

put sqlrecord_createObject("steps") into theStepA
sqlrecord_set theStepA, "id", 15

sqlrecord_link theLessonA, theStepA

Return

Error message