On Mon, 9 Aug 2010 17:53:02 -0500, Mike Henshaw
<mhens...@adcomtechnologies.com> wrote:

>>> Is there a way to create an incremental row or show a row number that is 
>>> linked to the current select query that can be used in
>>> calculations? 
>> 
>>> Basically a row counter for the current query that can be used in 
>>> calculations.
>
>>Your application makes a series of sqlite3_step calls, one for each row. 
>>Can't it just increment a counter on each step?
>
>>> 2. The application is written in C/CPP so no counters or variables from 
>>> C/CPP can be used.
>
>>I don't see how the second statement follows from the first. In fact, it 
>>appears that just the opposite should be the case.
>
>1. The application is from a third party with no access to the source code but 
>the SQL query can be updated since the SQL query is used in a custom HTML 
>template which can also be updated.
>2. The calculations to the RowNum would then have to be in the C/CPP 
>application which would nullify the use of customizable HTML template.
>
css will do that for you.

============= Demo file ============
<?xml version="1.0" encoding="ISO-8859-15"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en"
lang="en">
        <head>
                <title>Test pages</title>
                <meta http-equiv="content-type" content="text/html;
charset=ISO 8859-15" />
                <style type="text/css" />
table { counter-reset: line-number; }
td:first-child:before {
content: counter(line-number) ".";
counter-increment: line-number;
padding-right: 0.3em; }
                </style>
        </head>
        <body>
                <table>
                        <tr><th>#. col1</th><th>col2</th></tr>
                        <tr><td>val1.1</td><td>val1.2</td></tr>
                        <tr><td>val2.1</td><td>val2.1</td></tr>
                        <tr><td>val3.1</td><td>val3.2</td></tr>
                </table>
        </body>
</html>
=========== EOF ===========
-- 
  (  Kees Nuyt
  )
c[_]
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to