RE: cell colors PHP/MySQL
No. a switch requires 'testing' the condition, and for every row. The CSS way is much more efficient (and preferred for best practices) as it's more flexible. You can change the CSS file easily without changing any PHP code. But the speed will be the biggest improvement. A wise man once told me, Organization is the key to success. DÆVID -Original Message- From: Nicholas Vettese [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 09, 2006 12:33 PM To: mysql@lists.mysql.com Subject: Re: cell colors PHP/MySQL Wouldn't using a 'switch' statement work better? Just please do not ask me to show an example. :) - Original Message - From: Chris White [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Wednesday, August 09, 2006 3:30 PM Subject: Re: cell colors PHP/MySQL On Wednesday 09 August 2006 12:24 pm, Brian E Boothe wrote: i'm needing assistance in table Cell color thru MySQL i have a project were im listing a projects in a table either Complete / Active / Pending / now im needing these refrances cells to change Color whenver its lists them out on a page, [Complete] = green[Active] = Blue[Pending] = yellow Can someone Give me refrences or Code in PHP to how to accomplish this Well, I'd just have 3 css classes: complete, active, and pending. When it's outputting these cells, have the cells use the class attribute, setting them to the respective values. thanks -- Chris White PHP Programmer/DBanjo Interfuel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: cell colors PHP/MySQL
On Wednesday 09 August 2006 12:24 pm, Brian E Boothe wrote: i'm needing assistance in table Cell color thru MySQL i have a project were im listing a projects in a table either Complete / Active / Pending / now im needing these refrances cells to change Color whenver its lists them out on a page, [Complete] = green[Active] = Blue[Pending] = yellow Can someone Give me refrences or Code in PHP to how to accomplish this Well, I'd just have 3 css classes: complete, active, and pending. When it's outputting these cells, have the cells use the class attribute, setting them to the respective values. thanks -- Chris White PHP Programmer/DBanjo Interfuel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: cell colors PHP/MySQL
Wouldn't using a 'switch' statement work better? Just please do not ask me to show an example. :) - Original Message - From: Chris White [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Wednesday, August 09, 2006 3:30 PM Subject: Re: cell colors PHP/MySQL On Wednesday 09 August 2006 12:24 pm, Brian E Boothe wrote: i'm needing assistance in table Cell color thru MySQL i have a project were im listing a projects in a table either Complete / Active / Pending / now im needing these refrances cells to change Color whenver its lists them out on a page, [Complete] = green[Active] = Blue[Pending] = yellow Can someone Give me refrences or Code in PHP to how to accomplish this Well, I'd just have 3 css classes: complete, active, and pending. When it's outputting these cells, have the cells use the class attribute, setting them to the respective values. thanks -- Chris White PHP Programmer/DBanjo Interfuel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: cell colors PHP/MySQL
http://www.php.net there are many code examples here. That is a probably more appropriate place for such a question Regards --- ** _/ ** David Logan *** _/ *** ITO Delivery Specialist - Database *_/* Hewlett-Packard Australia Ltd _/_/_/ _/_/_/ E-Mail: [EMAIL PROTECTED] _/ _/ _/ _/ Desk: +618 8408 4273 _/ _/ _/_/_/ Mobile: 0417 268 665 *_/ ** ** _/ Postal: 148 Frome Street, _/ ** Adelaide SA 5001 Australia invent --- -Original Message- From: Brian E Boothe [mailto:[EMAIL PROTECTED] Sent: Thursday, 10 August 2006 4:55 AM To: mysql@lists.mysql.com Subject: cell colors PHP/MySQL i'm needing assistance in table Cell color thru MySQL i have a project were im listing a projects in a table either Complete / Active / Pending / now im needing these refrances cells to change Color whenver its lists them out on a page, [Complete] = green[Active] = Blue[Pending] = yellow Can someone Give me refrences or Code in PHP to how to accomplish this thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: cell colors PHP/MySQL
Brian E Boothe wrote: i'm needing assistance in table Cell color thru MySQL i have a project were im listing a projects in a table either Complete / Active / Pending / now im needing these refrances cells to change Color whenver its lists them out on a page, [Complete] = green[Active] = Blue[Pending] = yellow Can someone Give me refrences or Code in PHP to how to accomplish this thanks Probably have better luck asking this on the PHP general mailing list. Or any of the various PHP sites with forums. -- life is a game... so have fun. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]