|
Re: Weird Parent->Child->Child screens help [message #1433 is a reply to message #1432] |
Tue, 08 July 2008 19:33 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
You don't need to modify std.list1.inc to call your helper function instead of getData(). You can use a special class which inherits from 'std.table.class.inc' even though it does not do any database access. Take a look at http://www.tonymarston.net/php-mysql/infrastructure-faq.html #faq57 which describes the use of a virtual table - a class which has no corresponding database table. This describes a task which is available in the Classroom prototype, so you have some working code to examine which you can use to build your own task.
The getData() will by default try to access the database, but after receiving data from the parent class you can turn off the database read and do something else instead. You can even construct the string which is then passed down to the next table class.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Weird Parent->Child->Child screens help [message #1450 is a reply to message #1449] |
Thu, 10 July 2008 13:34 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
What value do you have set for $this->rows_per_page for the inner entity? Does your modified LIST2 script have a line which reads $dbinner->setRowsPerPage(1)? How many records actually match your selection criteria?
$this->rows_per_page governs the value of LIMIT which is used in the sql SELECT statement, so if it is only returning 1 then either:
(a) you have set LIMIT to 1, or
(b) only 1 record satisfies the selection criteria
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
|
|
|
|
|