Search Engine Optimization > Webmaster World > Debugging sux
Debugging sux
Posted by Duende on February 16th, 2004


Just so you know.

--
Duende
Recommended hosting
www.hostingforabuck.net
www.affordablehost.com

Posted by Leonard Blaisdell on February 16th, 2004

In article <Xns9490BBE67DB92xxxspamwipkipbiz@130.133.1.4>, Duende
<xxxspam@wipkip.biz> wrote:

Whatcha debugging?

leo

--
<http://web0.greatbasin.net/~leo/>

Posted by Duende on February 16th, 2004

While sitting in a puddle Leonard Blaisdell scribbled in the mud:



--
Duende
Recommended hosting
www.hostingforabuck.net
www.affordablehost.com

Posted by GreyWyvern on February 16th, 2004

On 16 Feb 2004 18:52:30 GMT, Duende <xxxspam@wipkip.biz> wrote:

Need a hand or three?

Grey

Posted by Bill Logan on February 17th, 2004


"Leonard Blaisdell" <leo@greatbasin.com> wrote in message
news:leo-1602040857150001@leosmac.sparks.nv.us...



Posted by Duende on February 17th, 2004

While sitting in a puddle Bill Logan scribbled in the mud:



--
Duende
Recommended hosting
www.hostingforabuck.net
www.affordablehost.com

Posted by Duende on February 17th, 2004

While sitting in a puddle GreyWyvern scribbled in the mud:

Thanks for the offer but I tried a whole new approach & it's better than
the way I couldn't make work, well more or less. ) Don't worry I will
have more little bugs.

All I wanted to do was change table row color based on odd/even dates on
an output from a MySQL database. I only tried about 6 different ways but
no-go so I just added another row to my database table and have the day
inserted into it. Now I use the day name as the style class. Now I have 7
colors instead of 2. I still want to figure out how to change class
based on date.

--
Duende
Recommended hosting
www.hostingforabuck.net
www.affordablehost.com

Posted by Bill Logan on February 17th, 2004


"Duende" <xxxspam@wipkip.biz> wrote in message
news:Xns9492960D2472xxxspamwipkipbiz@130.133.1.4.. .
Only time to get the fruit in and bottled then batten down for winter




Posted by GreyWyvern on February 17th, 2004

On 17 Feb 2004 09:13:34 GMT, Duende <xxxspam@wipkip.biz> wrote:

I still want to figure out how to change class
<style type="text/css">

..class1 { /* ODD */
...
...
}
..class2 { /* EVEN */
...
...
}

</style>

....

<table cellpadding="0" cellspacing="0" border="0">
<tr class="class<?php echo (gmdate("j", $time + $offset) % 2 == 0) ? "2"
: "1"; ?>">
</tr>
</table>

// $time is the UNIX timestamp pulled from your database
// $offset is your time zone offset in seconds difference from GMT

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollory that nothing is ridiculous.
- http://www.greywyvern.com - Orca RingMaker: PHP web ring creation and
management

Posted by Duende on February 17th, 2004

While sitting in a puddle GreyWyvern scribbled in the mud:

really don't understand why the first one doesn't work.
-----------------------------

// Set row style
$odd = FALSE; //initialize to default
if($data[DATE] % 2 != 0){
$odd = TRUE;
}
if($odd = TRUE){
$style = "one";
}
else{
$style = "two";
}
?>
<tr class="<?=$style?>">
====================================

$lastdate = "";
$datecount = 0;
while ($date = mysql_fetch_array($results)) {
if ($lastdate != $date['DATE']) {
$datecount++;
}
$lastdate = $date['DATE'];
if ($datecount %2) {
$style="one";
} else {
$style = "two";
}
echo "<tr class='$style'>

========================================

while ($data = mysql_fetch_array($results))

$odd = FALSE; //initialize to default
if($data[DATE] % 2 != 0){
$odd = TRUE;
}
if($odd == TRUE)
{
echo "
<tr class=\"one\">
<td>$date</td>
</tr>
";
}
else{
echo "
<tr class=\"two\">
<td>$date</td>
</tr>
";

==========================

--
Duende
Recommended hosting
www.hostingforabuck.net
www.affordablehost.com

Funbolt.com - Entertainment portal, wallpapers, sexy celebs