This topic is locked

Complicated Table Question

4/21/2008 1:11:21 AM
PHPRunner General questions
Z
zephyr325 author

Hi. I'm trying to create a page that displays the results of the last weeks' worth of data. The format I'm trying to get is:
|--------| Today's Date | Today's Date - 1 | Today's Date - 2| Today's Date - 3 | <etc>

Job #1 | Success ------| Success-----------| -----Failure-------| -------Failure-------| -Success

Job #2 | Success ------| Success-----------| -----Success------| -------Success-----| -Success

Job #3 | Failure -------| Failure-------------| -----Failure-------| -------Failure-------| -Success
The SQL table I'm using has the last week's worth of data built as a dynamic view, so the columns just need to be a listing of whatever the possible dates are.

The SQL table has a row for each job for each day showing success or failure.

The PHP code would need to figure out what to plug into each cell based off the data in the SQL table.
So in other words, this table is dynamically creating columns of today's date through last week's date, and then using a each SQL row to calculate one cell's worth of data and plugging it into the right place.
Is this something PHP Runner is capable of?
Thanks...

Alexey admin 4/21/2008

Hi,
sure, this is possible.

The first way is to construct an SQL query that return results in the format you need.

The second is using List page: After record processed event to fill in columns for each job and day.