RE: [PHP-DB] Re: Table Output Question

2005-11-14 Thread Bastien Koert
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 the same thing, just neater and lets you concentrate on the cod

[PHP-DB] Re: Table Output Question

2005-11-14 Thread Jeff Grossman
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

Re: [PHP-DB] Re: Table Output Question

2005-11-14 Thread Micah Stevens
Sorry, that's shorthand.. is the same as: is the end tag.. On Monday 14 November 2005 6:26 pm, Jeff Grossman wrote: > 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_ass

[PHP-DB] Re: Table Output Question

2005-11-14 Thread Jeff Grossman
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";

Re: [PHP-DB] Re: Table Output Question

2005-11-14 Thread Micah Stevens
Sorry if I sounded offended, I'm not. I was just curious because the advantage wasn't obvious to me. I see your point now though. Thanks for the insight. On Monday 14 November 2005 6:12 pm, Ajree wrote: > Micah Stevens wrote: > > I don't see what's more elegant about. They have a good point tha

Re: [PHP-DB] Re: Table Output Question

2005-11-14 Thread Ajree
Micah Stevens wrote: I don't see what's more elegant about. They have a good point that you only need to do one out of the two, but doing it in Javascript versus PHP only has the advantage that it puts the processing load for that on the client computer. Am I missing something? The second

Re: [PHP-DB] Re: Table Output Question

2005-11-14 Thread Micah Stevens
I don't see what's more elegant about. They have a good point that you only need to do one out of the two, but doing it in Javascript versus PHP only has the advantage that it puts the processing load for that on the client computer. Am I missing something? On Monday 14 November 2005 5:25 p

[PHP-DB] Re: Table Output Question

2005-11-14 Thread Ajree
Take a look at this article on ALA: http://www.alistapart.com/articles/zebratables/ It makes markup more elegant than repeated . -- Ajree Jeff Grossman wrote: 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 difficul

RE: [PHP-DB] Table Output Question

2005-11-14 Thread Bastien Koert
..."; } bastien ps: a class css definition would be better here From: Jeff Grossman <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] Table Output Question Date: Mon, 14 Nov 2005 15:37:36 -0800 I have a table, where each line is the output of a query from a MySQL database.

Re: [PHP-DB] Table Output Question

2005-11-14 Thread Micah Stevens
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 ha

[PHP-DB] Table Output Question

2005-11-14 Thread Jeff Grossman
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) {

Re: [PHP-DB] Sending multiple items via a single form field

2005-11-14 Thread Miles Thompson
At 04:40 PM 11/14/2005, Chris Payne wrote: Hi there everyon, I have a set of form fields dynamically generated but each item must contain 2 pieces of data - the input from the field AND the id that the input represents from the DB. I had this info a while back but had a major HD crash and lost

Re: [PHP-DB] Sending multiple items via a single form field

2005-11-14 Thread Micah Stevens
You could just seperate the data in the field's value with a delimeter like | or something you wouldn't see in the data, then explode() based on that? What kind of field are you using? Your explanation is very vague. On Monday 14 November 2005 12:40 pm, Chris Payne wrote: > Hi there everyon,

[PHP-DB] Sending multiple items via a single form field

2005-11-14 Thread Chris Payne
Hi there everyon, I have a set of form fields dynamically generated but each item must contain 2 pieces of data - the input from the field AND the id that the input represents from the DB. I had this info a while back but had a major HD crash and lost the info I had, how can I do this easily i

RE: [PHP-DB] HTTP Auth help required, please?

2005-11-14 Thread Denis Gerasimov
Hello, 1. Upgrade to the latest version (1.3.0rc3 beta), AFAIK 1.2.3 doesn't support custom containers if you use this feature 2. allow_call_time_pass_reference must be 'on', otherwise it fails (produces an error message) 3. turn error_reporting(E_ALL); and see if there are any notices/warnings