This topic is locked
[SOLVED]

 How to get the row or record rumber in a list page

11/28/2009 8:54:33 PM
PHPRunner General questions
L
Lorenbond author

I need to display at least 100 records per page.
Currently, each record contains a photograph. (This makes the page very slow to load.)
I need to quit loading the photographs after the first 25 records.
To do this I need to know the ROW or RECORD number in the list page.
How do I obtain the row number?
Thanks

J
Jane 11/30/2009

Hi,
use $recno global variable in the List page: After record processed event:

global $recno;

echo $recno;
L
Lorenbond author 12/2/2009



Hi,
use $recno global variable in the List page: After record processed event:

global $recno;

echo $recno;



I want to prevent all records greater than the first 25 from displaying the picture.

I used the following code; however, ALL pictures in all 100 records fail to load, not just the records greater than 25.



global $recno;

if($recno>25)

$data["picture"]="";


What am I doing wrong?

I'm using 4.2 build 379

L
Lorenbond author 12/2/2009



I want to prevent all records greater than the first 25 from displaying the picture.

I used the following code; however, ALL pictures in all 100 records fail to load, not just the records greater than 25.



global $recno;

if($recno>25)

$data["picture"]="";


What am I doing wrong?

I'm using 4.2 build 379

L
Lorenbond author 12/2/2009

[quote name='The Parts Hanger' date='03 December 2009 - 02:20 AM' timestamp='1259806859' post='45885']

[quote name='The Parts Hanger' date='03 December 2009 - 02:13 AM' timestamp='1259806436' post='45884']
I want to prevent all records greater than the first 25 from displaying the picture.

I used the following code; however, ALL pictures in all 100 records fail to load, not just the records greater than 25.



global $recno;

if($recno>25)

$data["picture"]="";


What am I doing wrong?

I'm using 4.2 build 379
Never mind I just figured it out. I used the code in th List page: BEFORE record processed event:
Thanks so much! This really helped alot.