How to remove a string from a ColdFusion request?
Given the request (pseudo-code):
<cfquery name="myquery">SELECT * FROM stuff</cfquery>
How do I get rid of the first record? In this case, changing SQL is not an option. I tried: myquery.RemoveRows(0,1);but received an error message:
No matching Method/Function for Query.REMOVEROWS(numeric, numeric) found
I am on a Railo 3 BTW
It is impossible to think of a way to remove a row from the original object. I can think of two things:
Performs a query request. It is assumed that you can identify records that you do not want and specify them in WHERE.
queryNew(). querySetCell() . UDF. , , , cflib.org. . # 3
cflib.org:) http://www.cflib.org/udf/QueryDeleteRows
, :
SELECT * FROM myquery
LIMIT {1,10000}
This should work in Railo. What he does is offset the request one at a time and pull out 10,000 records.
You can also do this:
SELECT * FROM myquery
WHERE {primarykey} <> {value}
Where he selects all records except the primary key value that you pass.
The great thing about ColdFusion is that there are many ways to do exactly what you are looking for.