query.addRow()
Adds a specified number of empty rows to a query.
Lucee 6 changed the return value from the number of rows, to the modified query, to match ACF
query.addRow( numberOrData=any )
Returns: Query
| Argument | Description |
|---|---|
|
numberOrData
any,
optional
|
edit
Number of rows to add to the query or a struct/array containing the data tp populate the row. Examples:
Alias: number, data |
Examples
editmyQuery = queryNew( "id,name");
addedRows = myQuery.addRow( 3 ); // will return 3
myQuery.addRow([17,'added via array notation']);
anotherRow = myQuery.addRow(); // will return 4
myQuery.addRow({
id:18,
name:'added via struct notation'
});
dump(myQuery);