Description

Deletes a row from a query object.

Returns

Boolean, which indicates whether the row is successfully deleted.

Category

Syntax

QueryDeleteRow(Object queryObject, int rowNum)

History

New in ColdFusion (2018 release).

Parameters

Parameter

Required/Optional

Description

queryObject

Required

The query object in which a column is to be deleted.

rowNum

Required

The row number corresponding to the row to be deleted.

Example

<cfscript>
	 myResult=QueryExecute(("SELECT * FROM EMPLOYEES WHERE EMP_ID BETWEEN :low AND :high"),{low=4,high=14},
       {datasource="cfdocexamples"});
     writeOutput("Array before deleting any row" & "<br/>");
     writeDump(myResult);
     writeOutput("Deleting row 2" & "<br/>");
     myDeletedRow=QueryDeleteRow(myResult,2);
     // Display output after row deletion
     writeOutput("<br/>" & myDeletedRow);
     writeOutput("<br/>" & "Array after deleting the row" & "<br/>");
     WriteDump(myResult);
</cfscript>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy