Auto number column in list page

Tips submitted by PHPMaker users
Post Reply
Storm

Auto number column in list page

Post by Storm »

function ListOptions_Load() {

$item = &$this->ListOptions->Add("place");
$item->Header = "NUMBER"; // Set the column header (for List page)
$item->OnLeft = TRUE; // Link on left
$item->MoveTo(0); // Move the column to the specified index

$numr = 0;
}

and...

function ListOptions_Rendered() {
// Example:

$this->ListOptions->Items["place"]->Body = $GLOBALS["numr"]++;
}


Altin

Post by Altin »

How about autonumber in VIews (I have a mysql view and i want to autonumber it)
Anyway thanks for the tip


made

Post by made »

on the nextpage the autonumber returns to 1 again;
how to make it autonumber for all records? (on next page autonumber continue until end of records)


beyond

Post by beyond »

any advice as above email ? on next page auto number continue until end of records. I have V8. thanks you


Webmaster
User
Posts: 9427

Post by Webmaster »

$this->ListOptions->Items["place"]->Body = $this->RecCnt;


made

Post by made »

wow.. thanks, it works.. i've been struggle with this for along time


Webmaster
User
Posts: 9427

Post by Webmaster »

There is an option "Sequence No." since v10, see Table Setup in the help file.


pandapipino
User
Posts: 103

Post by pandapipino »

Is there a way to continue the auto number even on search?

Thanks


Post Reply