QueryAddRow()

Adds rows to a query, either empty row(s) or you can add a row with data.

The number returned is the new row count of the query.

QueryAddRow( query=query, numberOrData=any );

Returns: Number

Argument Description Default
query
query, required

Name of an executed query.

numberOrData
any, optional

Number of rows to add to the query or a struct/array containing the data to populate the row.

Examples:

  • queryAddRow(qry, 3);
  • queryAddRow(qry, [ "Susi", 20] );
  • queryAddRow(qry, { name: "Susi", age: 20 } );

Alias: number, data

1

Examples

myQuery    = queryNew( "id,name");
addedRows  = queryAddRow(myQuery, 3); // will return 3

queryAddRow(myQuery, [17,'added via array notation']);

anotherRow = queryAddRow(myQuery); // will return 4

queryAddRow(myQuery, { id:18, name:'added via struct notation' }); dump(myQuery);

See also