Returns the ID of a column appearing in the most recently executed query's ORDER BY clause.
INT dbordercol (
PDBPROCESS dbproc,
INT order );
where
The column ID (based on the column's position in the select list) for the column in the specified place in the ORDER BY clause. If the order is invalid, then -1 is returned.
Call dbordercol after dbresults has returned SUCCEED.
In this example, dbordercol(dbproc, 1) returns 3 since the first column named in the ORDER BY clause refers to the third column in the SELECT statement:
select dept, name, salary from employee order by salary, name