[sqlite] How do you access a specific row of a resultset?

2012-05-16 Thread Goatjugsoup
Hi, I want to know how to go about getting a specific row from a resultset (or if there is a different way to do it Im all for that too) My code goes something like this, stat being a statement variable already initialised previously. I thought perhaps absolute sounds like it might give the

Re: [sqlite] How do you access a specific row of a resultset?

2012-05-16 Thread Simon Slavin
On 16 May 2012, at 9:04am, Goatjugsoup goatjugs...@hotmail.com wrote: Hi, I want to know how to go about getting a specific row from a resultset (or if there is a different way to do it Im all for that too) My code goes something like this, stat being a statement variable already

Re: [sqlite] How do you access a specific row of a resultset?

2012-05-16 Thread Igor Tandetnik
Goatjugsoup goatjugs...@hotmail.com wrote: Hi, I want to know how to go about getting a specific row from a resultset (or if there is a different way to do it Im all for that too) That rather depends on what it is. What's the point of the exercise? Are you looking to implement something like

Re: [sqlite] How do you access a specific row of a resultset?

2012-05-16 Thread Rob Richardson
The other thing you are not thinking about is that you never know the order of data in a set. You may think that you want the 5th record that was ever inserted into the table, but you have no guarantee that a select statement will return records in the order in which they were inserted. The

Re: [sqlite] How do you access a specific row of a resultset?

2012-05-16 Thread Goatjugsoup
Well, a new thought just came to me, if I use the same sql statement will the resultset be in the same order each time because if that is the case I imagine I could use a for statement and an index to move through it the way I want to with next inside of that as many times as it takes to get to

Re: [sqlite] How do you access a specific row of a resultset?

2012-05-16 Thread Pavel Ivanov
if I use the same sql statement will the resultset be in the same order each time Only if you use ORDER BY clause, and the set of columns in this clause have unique values for each row, and all these values don't change between query executions. Pavel On Wed, May 16, 2012 at 6:14 PM,

Re: [sqlite] How do you access a specific row of a resultset?

2012-05-16 Thread Simon Slavin
On 16 May 2012, at 11:14pm, Goatjugsoup goatjugs...@hotmail.com wrote: Well, a new thought just came to me, if I use the same sql statement will the resultset be in the same order each time because if that is the case I imagine I could use a for statement and an index to move through it the