Since I have been using the  phplib 7.0 within an
intranet database project, I programmed some 
extented functionality, that I will quickly describe. 

I you think, that could be of common 
interest, I will prepare it for the 
cvs-archive (get the tabs out :) ). 



One extention concerns the Table-class (table.inc). 
It allows a content sensitive format for the single
table cells (please see the example below); 

Also possible is the content sensitive spanning of
rows and columns as well as the control of the
cell background color or other html value 
assigments for the td - or th opening tags. 

Regards, 

Michael



/************************* example ****************
works with a dataset that includes  an 
'expected' and an 'achieved' column with numerical
values; 
the format condition 'conds' is validated for 
each single row of the dataset; 
if in the row the value of the 
'achieved'-column is below the one of the 
'expected'-column, the color of the 'achieved'-value
is set red. 
[] is a placeholder for the value of the target 
column  ( =>'achieved'); 
the function also can be applied to an array
of columns or to all columns of a table
**************************************************/
$t = new fTable; 
$t->add_format(array('cols'=>"achieved" , 
                     'conds'=>"([expected] > [])",
                     'formats'=>"<font color='red'>[]</font>")); 
$t->show_result($db); 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.de


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to