ROWID logic is stupid idea.
You will get wrong result set over period of time.

See below:
PHP Code:

Logic based on the ROWID will NOT work always
.
See the example below:

SQLselect from a ;

         
B
----------
         
1
         2
         4
         9
        18
         4

6 rows selected
.

SQLselect sum(bover(order by rowid)) accu from a ;

      
ACCU
----------
         
1
         3
         7
        16
        34
        38

6 rows selected
.

SQLdelete a where b in (1,2) ;

2 rows deleted.

SQLcommit;

Commit complete.

SQLselect from a ;

         
B
----------
         
4
         9
        18
         4

SQL
insert into a values (3) ;

1 row created.

SQLcommit;

Commit complete.

SQL>  select from a ;

         
B
----------
         
4
         9
        18
         4
         3  
--> new row 

SQL
insert into a values(1) ;

1 row created.

SQLcommit;

Commit complete.

SQL>  select from a ;

         
B
----------
         
4
         9
        18
         4
         3
         1 
--- new row

6 rows selected
.

SQLinsert into a values(2);

1 row created.

SQLcommit;

Commit complete.

SQLselect from a ;

         
B
----------
         
2   ----> This new row has the lowest rowid 
         4
         9
        18
         4
         3
         1

7 rows selected
.

You will get completely WRONG result here

SQLselect sum(bover(order by rowid)) accu from a ;

      
ACCU
----------
         
2
         6
        15
        33
        37
        40
        41

7 rows selected

Tamil