GetGrid(flags, array_name, table, rows, fields, where, related, related_id, order_by)
ExtraSQLJOIN can be used to pass additional joins to GetGrid
Returns
- Array: corresponding to the database record set in the format array_name(field,row)
- RowCnt: the number of rows found starting from 1
By default, returns the following records:-
| Admin | Current version of each |
| Stage | Only records which have been staged |
| Live | Only records which have been published and approved |
Parameters
|
Flags |
Optional stringh of flags. More than one flag can be included.
|
|
Array Name |
Can be any valid VBScript array name. |
|
Table |
A database table |
| Rows |
Optional - defaults to all rows Numeric - The top n rows |
| Fields | String - Comma separated list of fields |
| Where | Optional. String - A valid where clause, without the WHERE statement |
| Related |
Optional String - A table containing records related to the main table ! in front of related table name denotes reverse relationship |
| Related_ID | Optional Numeric - The ID of a specific related record |
| Order_By |
Optional SQL order by clause without the ORDER BY statement eg: ID DESC |