Bastien Koert [EMAIL PROTECTED] wrote:
Simply put, you create a couple of css classes that make the row look the
way you want and then
while ($rows = mysql_fetch_array($result))
{
$color = ($counter % 2 ==0) ? rowclass1 : rowclass2 ;
echo tr class='$color'td...;
}
Its essentially
I have a table, where each line is the output of a query from a MySQL
database. I do not use borders, so the page is a little difficult to
read sometimes. Is it possible, or how do I, alternate the background
color of each row when I output it?
My code is like this:
while (query) {
Micah Stevens [EMAIL PROTECTED] wrote:
You don't have to output two rows.. just do this:
$color = red; // init first color.
while ($row = mysql_fetch_assoc($data)) {
if ($color == red) {
$color = blue;
} else {
$color = red;
}
Bastien Koert [EMAIL PROTECTED] wrote:
?php
$row1 = FF;
$row2 = AA;
$counter = 0;
while ($rows = mysql_fetch_array($result))
{
$color = ($counter % 2 ==0) ? $row1 : $row2 ;
echo tr style='backgroundcolor:$color'td...;
}
bastien
ps: a class css definition would
\IModify/I/A/
A HREF=\delete.php?rowid=$rowid\IDelete/I/A
/TD
/TR\n;
}
echo /TABLE;
mysql_free_result($result);
?
BRBR
A HREF=internal.htmlReturn To Main Menu/ABR
A HREF=add.phpAdd An Item/A
/body
/html
--
Jeff Grossman ([EMAIL PROTECTED])
--
PHP Database Mailing
the value
that is in the database.
Can I use a drop down menu, or should I just go to radio buttons?
Thanks,
Jeff
--
Jeff Grossman ([EMAIL PROTECTED])
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
[EMAIL PROTECTED] (Fabian Pichler) wrote:
Hello together
I'm a real newbie on PHP/Mysql.
I'm trying to get PHP/mysql to work together on my MOSXS 1.0-2 Server.
Has anyone done this before?
My problem is the mysql support (--with-mysql=/usr/local/mysql) in PHP.
If I compile the PHP with this
];
printf(A
HREF=\mailto:[EMAIL PROTECTED]?subject=$store\%20$jobdesc\;$jobdesc/ABR\n);
}
}
mysql_free_result($result);
?
/body
/html
Thank you,
Jeff
---
Jeff Grossman ([EMAIL PROTECTED])
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED
after the query then , then the link resource
-Original Message-
From: Jeff Grossman [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 07, 2001 6:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Parsing Error
I keep getting the following error:
Warning: Supplied argument is not a valid MySQL
Fabian Pichler [EMAIL PROTECTED] wrote:
My problem is the mysql support (--with-mysql=/usr/local/mysql) in PHP.
If I compile the PHP with this configure option apache 1.3.12 (or 1.3.9)
doesn't start anymore.
Try just using the --with-mysql option and not supplying a path. It
works for me.
10 matches
Mail list logo