How do I discard a row from a ColdFusion query?

Jordan Sitkin picture Jordan Sitkin · Apr 22, 2011 · Viewed 7.8k times · Source

Given a query (pseudo-code):

<cfquery name="myquery">SELECT * FROM stuff</cfquery>

How do I get rid of the first record? In this case, altering the SQL is not an option. I have tried: myquery.RemoveRows(0,1); but received an error:

No matching Method/Function for Query.REMOVEROWS(numeric, numeric) found

I'm on Railo 3 BTW

Answer

Jordan Sitkin picture Jordan Sitkin · Apr 22, 2011

Lo and behold:

myquery.RemoveRow(1);

Does exactly what I wanted. Leave it to Railo to do things a little differently!