This topic is locked

Adding code to populate a cell on a reports page

3/5/2010 4:33:16 PM
PHPRunner General questions
S
siliconswamp author

I am a little stuck, and this is not covered in the manual (Figures) I have a need to add a snippet of code to a reports page that will populate a row on an added column to the output table. However I am unsure how to get the data from the SQL query into this function as this is for a multi user site.
The Table looks like the one below:
Usage UP | Usage DN | Usage MTD | Update Date | Update Time | Software Version

10 10 20 1/1/2009 8:00:00 AM 2.0
I want to get the variables from the array that is created on the search and insert this into a new column on the table.
if ($Usage_MTD_value < 500){

print "<img src=\"greenball.jpg\" width=\"16\" height=\"16\">";

}

else {

print "<img src=\"redball.jpg\" width=\"16\" height=\"16\">";

}

I am still unfamiliar with how to pull the value for Usage MTD for each row and generate the above code for each column at the end.
Basically I want to display a red or green ball icon if the bandwidth is over or under 500.
The getting of variables is not very well defined in the documentation, I have even tried the $data[`Usage MTD'] operator as described in portions of the document.
Thanks for any input