Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  CRITICAL: Handle to the database fields values

phpMyEdit General     CRITICAL: Handle to the database fields values
Post new topic   Reply to topic    
 
seshu     Joined: 19 Apr 2008   Posts: 2  
Post Posted: 2008-04-19 12:43
Back to top  Reply with quote     

Hi,

I want to apply a php function on the field value before populating the value in the table cell. But currently I cannot access the value directly through a variable or array.

Is there any way where I can get the field value into a variable, so that I can apply more functions or do more operations on it, before populating the data?

Thanks,
Seshu

 
seshu     Joined: 19 Apr 2008   Posts: 2  
Post Posted: 2008-04-27 05:25
Back to top  Reply with quote     

doug wrote:
Please post an example of what you are attempting to do.


> I have a list of employee in my database table.
I want to color the rows, for those employees who belong to a Department ABCD.

Like this:
if($opts['fdd']['dept'] == "ABCD") $bgColor = "blue";
echo "<Tr bgcolor=".$bgColor."><Td>Employee - Dept</Td></Tr>";

Or else,
If I build up an array of my departments and respective colors, is there a way that I can pass the department name (which is coming from a db column) as a key to my array, based on which I can color the row.

Eg:
$dept['ABCD'] = "blue";
$dept['PQRS'] = "RED";
$dept['XXXX'] = "yellow";

Can I do something like
echo $dept[<my database column name>];

Thanks in advance.

Seshu

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy