This topic is locked

autoincreasment field

8/16/2009 6:54:26 AM
PHPRunner General questions
F
futo author

hello,
is there some custom code to display (reset) autoincreasment field only on print page starting always from 1. to etc. 10. (10 recordson page).
I mean if i have 100 records, but if i select randomly 10 records (Record_ID:1,15,25,9, 88 ETC.), I want to display they record_ID on printpage them from 1. to 10.
Manny thanks,
Tomo
PHPRunner 5.1 trial

J
Jane 8/17/2009

Hi,
you can do the following:

  • edit SQL query on the Edit SQL query tab:
    select

    '' as numberfield,

    field1,

    field2,

    ...

    From TableName


  • Then fill numberfield in the List page: After record processed event on theEvents tab:
    global $recno;

    $record["numberfield_value"] = $recno-1;