At 12:07 AM +0200 5/6/10, Michiel Sikma wrote:
On 2 May 2010 19:11, tedd
mailto:tedd.sperl...@gmail.comtedd.sperl...@gmail.com wrote:
government rant
-snip-
Yes, it would be nice if the people who work for the government also
had to live under the same rules as the rest of us. As it is,
On 6 May 2010 17:47, tedd tedd.sperl...@gmail.com wrote:
Michiel:
Considerate? Being Inconsiderate is what the government does for a living.
Additionally, what you said above is *your* opinion -- as *you* presented
in a public forum. Who's opinion is more appropriate for this list is
On 3 May 2010 08:25, Jochen Schultz jschu...@sportimport.de wrote:
[snip]
And unless we are adding a multiple seconds to the load time is anyone
going to notice a difference of 1 second?
yes
It's really not that big a deal.
http://pastie.org/947121
Personally, I think using modulus
On 2 May 2010 19:11, tedd tedd.sperl...@gmail.com wrote:
government rant
-snip-
Yes, it would be nice if the people who work for the government also had to
live under the same rules as the rest of us. As it is, they live in a state
of privilege enjoying salaries that are typically 175
[snip]
And unless we are adding a multiple seconds to the load time is anyone
going to notice a difference of 1 second?
yes
regards
Jochen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
At 11:53 PM -0400 5/1/10, Paul M Foster wrote:
On Fri, Apr 30, 2010 at 01:52:25PM -0400, tedd wrote:
All the code I provide on this list and on my various web sites is
for free for anyone, except for governments (i.e., local, state,
federal, other), to use, review, and/or comment as they
Paul M Foster wrote:
On Fri, Apr 30, 2010 at 01:52:25PM -0400, tedd wrote:
At 10:34 AM -0400 4/30/10, Paul M Foster wrote:
On Thu, Apr 29, 2010 at 05:34:38PM -0400, tedd wrote:
Please critically review my example.
+1
This thread came up before, and tedd's solution was the least
On 30 April 2010 21:20, Daevid Vincent dae...@daevid.com wrote:
-Original Message-
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Modulus is the most elegant solution I reckon. Imagine if you only
needed to highlight every 3rd row, or 4th? Easy to change the modulus
for it,
On Fri, Apr 30, 2010 at 01:52:25PM -0400, tedd wrote:
At 10:34 AM -0400 4/30/10, Paul M Foster wrote:
On Thu, Apr 29, 2010 at 05:34:38PM -0400, tedd wrote:
Please critically review my example.
+1
This thread came up before, and tedd's solution was the least complex,
as far as I could
-Original Message-
while(foo){
$tr = (0 == $trColor % 2)? #E8E8E8 : #FF;
echo tr style=\background-color:.$tr.\;
...
Don't do this modulus (%) math Just toggle a boolean!!
tr class=?= ($r = !$r) ? dataRow1 : dataRow2; ?
smime.p7s
Description: S/MIME cryptographic signature
On Fri, 2010-04-30 at 06:14 -0500, Jay Blanchard wrote:
[snip]
Don't do this modulus (%) math Just toggle a boolean!!
tr class=?= ($r = !$r) ? dataRow1 : dataRow2; ?
[/snip]
What is wrong with modulus math
Modulus is the most elegant solution I reckon. Imagine if you only
Paul M Foster wrote:
+1
This thread came up before, and tedd's solution was the least complex,
as far as I could tell. I shamelessly stole his code and regularly use
it in my own projects. ;-}
Or if one choose to use Smarty template.
tr bgcolor={cycle values=#ee,#d0d0d0}
At 10:34 AM -0400 4/30/10, Paul M Foster wrote:
On Thu, Apr 29, 2010 at 05:34:38PM -0400, tedd wrote:
Please critically review my example.
+1
This thread came up before, and tedd's solution was the least complex,
as far as I could tell. I shamelessly stole his code and regularly use
it in
At 4:37 PM +0200 4/30/10, Jay Ess wrote:
Paul M Foster wrote:
+1
This thread came up before, and tedd's solution was the least complex,
as far as I could tell. I shamelessly stole his code and regularly use
it in my own projects. ;-}
Or if one choose to use Smarty template.
tr bgcolor={cycle
On Fri, 2010-04-30 at 13:59 -0400, tedd wrote:
At 4:37 PM +0200 4/30/10, Jay Ess wrote:
Paul M Foster wrote:
+1
This thread came up before, and tedd's solution was the least complex,
as far as I could tell. I shamelessly stole his code and regularly use
it in my own projects. ;-}
Or if
At 7:26 PM +0100 4/30/10, Ashley Sheridan wrote:
On Fri, 2010-04-30 at 13:59 -0400, tedd wrote:
At 4:37 PM +0200 4/30/10, Jay Ess wrote:
Paul M Foster wrote:
+1
This thread came up before, and tedd's solution was the least complex,
as far as I could tell. I shamelessly stole his code and
-Original Message-
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Modulus is the most elegant solution I reckon. Imagine if you only
needed to highlight every 3rd row, or 4th? Easy to change the modulus
for it, not so easy to re-work a binary switch.
-Original
On Fri, 2010-04-30 at 15:59 -0400, tedd wrote:
At 7:26 PM +0100 4/30/10, Ashley Sheridan wrote:
On Fri, 2010-04-30 at 13:59 -0400, tedd wrote:
At 4:37 PM +0200 4/30/10, Jay Ess wrote:
Paul M Foster wrote:
+1
This thread came up before, and tedd's solution was the least complex,
as far as
On Apr 30, 2010, at 4:20 PM, Daevid Vincent wrote:
-Original Message-
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Modulus is the most elegant solution I reckon. Imagine if you only
needed to highlight every 3rd row, or 4th? Easy to change the modulus
for it, not so easy
At 8:29 AM -0300 4/28/10, Juan Rodriguez Monti wrote:
Hello Guys,
I would like to implement a two color row table for some queries
that I'm doing.
I use PHP to query a DB, then I use while to print all its results. I
have a code pretty similar to this one :
$results = Here the QUERY;
2010/4/29 tedd tedd.sperl...@gmail.com:
At 8:29 AM -0300 4/28/10, Juan Rodriguez Monti wrote:
Hello Guys,
I would like to implement a two color row table for some queries that I'm
doing.
I use PHP to query a DB, then I use while to print all its results. I
have a code pretty similar to
At 11:01 AM -0300 4/29/10, Juan Rodriguez Monti wrote:
2010/4/29 tedd tedd.sperl...@gmail.com:
At 8:29 AM -0300 4/28/10, Juan Rodriguez Monti wrote:
Hello Guys,
I would like to implement a two color row table for some queries that I'm
doing.
I use PHP to query a DB, then I use while to
$a=0;
while (++$a, $row=mysql_fetch_...){
echo tr class=\alternate-row-.($a%2).\...
}
Shiplu Mokaddim
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the
Hello Guys,
I would like to implement a two color row table for some queries that I'm doing.
I use PHP to query a DB, then I use while to print all its results. I
have a code pretty similar to this one :
$results = Here the QUERY;
echo html;
echo head;
echo 'link
On Wed, 2010-04-28 at 08:29 -0300, Juan Rodriguez Monti wrote:
Hello Guys,
I would like to implement a two color row table for some queries that I'm
doing.
I use PHP to query a DB, then I use while to print all its results. I
have a code pretty similar to this one :
$results = Here
[snip]
I just want to show you how I write the table. What I would like to
know is what do you suggest to do a two color row format.
[/snip]
Before your table;
$trColor = 0;
Then during the loop;
while(foo){
$tr = (0 == $trColor % 2)? #E8E8E8 : #FF;
echo tr style=\background-color:.$tr.\;
On 4/28/10, Juan Rodriguez Monti wrote:
I would like to implement a two color row table for some queries that I'm
doing.
...
what do you suggest to do a two color row format.
Well, I wouldn't mix the presentation and querying of the db in one
place, but assuming that's just a simplified
It isn't good idea to use php to visualize your table. You can fetch
you data by php and style them by java script.
On Wed, Apr 28, 2010 at 3:59 PM, Juan Rodriguez Monti
j...@rodriguezmonti.com.ar wrote:
Hello Guys,
I would like to implement a two color row table for some queries that I'm
On Wed, 2010-04-28 at 16:16 +0430, Ali Asghar Toraby Parizy wrote:
It isn't good idea to use php to visualize your table. You can fetch
you data by php and style them by java script.
On Wed, Apr 28, 2010 at 3:59 PM, Juan Rodriguez Monti
j...@rodriguezmonti.com.ar wrote:
Hello Guys,
I
2010/4/28 Jay Blanchard jblanch...@pocket.com:
[snip]
I just want to show you how I write the table. What I would like to
know is what do you suggest to do a two color row format.
[/snip]
Before your table;
$trColor = 0;
Then during the loop;
while(foo){
$tr = (0 == $trColor % 2)?
[snip]
Before your table;
$trColor = 0;
Then during the loop;
while(foo){
$tr = (0 == $trColor % 2)? #E8E8E8 : #FF;
echo tr style=\background-color:.$tr.\;
...
Replace the hex values with the colors you desire.
Just one more question about this.
I'm getting something like
Like this?
$color[0] = 'red';
$color[1] = 'blue';
for ($i=0;foo;$i++) {
echo 'tr style:background-color:'.$color[$i%2]...
regards
Jochen
Jay Blanchard schrieb:
[snip]
Before your table;
$trColor = 0;
Then during the loop;
while(foo){
$tr = (0 == $trColor % 2)? #E8E8E8 : #FF;
echo tr
2010/4/28 Jay Blanchard jblanch...@pocket.com:
[snip]
Before your table;
$trColor = 0;
Then during the loop;
while(foo){
$tr = (0 == $trColor % 2)? #E8E8E8 : #FF;
echo tr style=\background-color:.$tr.\;
...
Replace the hex values with the colors you desire.
Just one more
I agree with you. in this simple example we can use php but we may need
table with extra functionality and only client side scripts are reasonable
and applicable. we can create multi color and clickable rows by php but
we'll have greater server load.
anyway that was only an propose;-)
On Wed, Apr
What about this:
$color = even;
while ($row = while condition )) {
$color = ($color == even) ? odd : even;
echo (tr class=\$color\);
echo td$row[0]/tdtd$row[1]/td
td$row[2]/tdtd$row[3]/tdtd$row[4]/td ;
echo (/tr)
}
And have two classes in your style sheet that
On Wed, 2010-04-28 at 17:59 +0430, Ali Asghar Toraby Parizy wrote:
I agree with you. in this simple example we can use php but we may
need table with extra functionality and only client side scripts are
reasonable and applicable. we can create multi color and clickable
rows by php but we'll
On Wed, 2010-04-28 at 09:34 -0400, Fernando wrote:
What about this:
$color = even;
while ($row = while condition )) {
$color = ($color == even) ? odd : even;
echo (tr class=\$color\);
echo td$row[0]/tdtd$row[1]/td
td$row[2]/tdtd$row[3]/tdtd$row[4]/td ;
But then you need to differentiate the table, otherwise all your tables
will have the same row formating no? This way you only apply the
formating to those rows that need it.
Fernando.
On 28/04/2010 09:35, Ashley Sheridan wrote:
On Wed, 2010-04-28 at 09:34 -0400, Fernando wrote:
What
On Wed, 2010-04-28 at 09:46 -0400, Fernando wrote:
But then you need to differentiate the table, otherwise all your tables
will have the same row formating no? This way you only apply the
formating to those rows that need it.
Fernando.
On 28/04/2010 09:35, Ashley Sheridan wrote:
On
2010/4/28 Fernando ferna...@ggtours.ca:
What about this:
$color = even;
while ($row = while condition )) {
$color = ($color == even) ? odd : even;
echo (tr class=\$color\);
echo td$row[0]/tdtd$row[1]/td
td$row[2]/tdtd$row[3]/tdtd$row[4]/td ;
echo (/tr)
}
And
From: Ashley Sheridan
On Wed, 2010-04-28 at 09:46 -0400, Fernando wrote:
But then you need to differentiate the table, otherwise all your
tables
will have the same row formating no? This way you only apply the
formating to those rows that need it.
Yes, but one would assume you'd be
On 28 April 2010 12:29, Juan Rodriguez Monti j...@rodriguezmonti.com.ar wrote:
Hello Guys,
I would like to implement a two color row table for some queries that I'm
doing.
I use PHP to query a DB, then I use while to print all its results. I
have a code pretty similar to this one :
42 matches
Mail list logo