SQL Yoga version 1.1.0 build 4 :: Visit website

Printer friendly version

command sqlquery_addScope

Adds an existing Scope object to a SQL Query Object.

command sqlquery_addScope @pQueryA, pScope, pParamsDotDotDot
Simple parameter. @pQueryA A SQL Query Object array.
Simple parameter. pScope The name of the Scope object to add to the query.
Simple parameter. pParamsDotDotDot Pass in additional parameters for use with any binding entries in the scopes conditions. You can pass in strings or a numerically indexed array.

This handler enables you to dynamically build search criteria for a SQL Query Object. This makes generating queries from complex search UIs much easier.

The array for parameter 3 is numerically indexed and each numeric key has a string and operater key.

If you are passing in multiple arrays for use in replacing the bindings used in the scope condition then each array MUST have the same number of numeric entries.
The string key will only be used from the first array passed in however.

put sqlquery_createObject("lessons") into theQueryA 
sqlquery_addScope theQueryA, "lessons linked to manuals"
sqlquery_retrieveAsArray theQueryA, theDataA



See also