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 "...";
>
> }
>
> Its essentially
Bastien Koert <[EMAIL PROTECTED]> wrote:
>
> $row1 = "FF";
> $row2 = "AA";
> $counter = 0;
>
> while ($rows = mysql_fetch_array($result))
> {
> $color = ($counter % 2 ==0) ? $row1 : $row2 ;
>
> echo "...";
>
> }
>
>
> bastien
>
>
> ps: a class css definition would be better here
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";
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) {
stored in
$store to automatically fill in on the drop down list. But, for some
reason it is defaulting to the first option, and not using 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 PROTECT
{
$store=$row["store"];
$jobdesc=$row["jobdesc"];
$rowid=$row["rowid"];
echo "
$store
$jobdesc
Modify/
Delete
\n;
}
echo "";
mysql_free_result($result);
?>
Return To Main Menu
Add An I
[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
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.
your call to mysql_query is incorrect
>" 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
>
"mailto:[EMAIL PROTECTED]?subject=$store\%20$jobdesc\";>$jobdesc\n");
}
}
mysql_free_result($result);
?>
Thank you,
Jeff
---
Jeff Grossman ([EMAIL PROTECTED])
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional c
10 matches
Mail list logo