You don't have to read into a memory array. How about just running through your selection with an sqlite3_step and counting the rows?

Gilles Roy wrote:
On Sun, Apr 22, 2007 at 05:33:43PM -0500, P Kishor wrote:

On 4/22/07, Gilles Roy <[EMAIL PROTECTED]> wrote:

Given a arbitrary statement, I need to find out which row a specific
result is in, as efficiently as possible. The arbitrary statement can
order the results any way it wants.


what do you mean by "which row"? Do you want to know the position of
the required row within your result set, sort of like


i = 0
foreach row
if currentrow's memberid == 4567373
  print i
  get out of the loop
else
  i++


That is what I want to do. I want to know where the memberid is in the list (imagine the list was a waiting list or something). Is there not a way to just get the row number back? Is seems inefficient to have to allocate all of the memory to hold all of the results and then iterate through them.

Thanks,
Gilles


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to