ubject: Re: [PHP] Table Making
> > be, but in my head it seems like it would work. Basically, what
> if the
> > while() printed multiple tables? In each table it made 5 rows,
> each row
> > with one cell in it, so it would then be vertical. I'm just not
> sure
&
> be, but in my head it seems like it would work. Basically, what if the
> while() printed multiple tables? In each table it made 5 rows, each row
> with one cell in it, so it would then be vertical. I'm just not sure
> how to incorporate into the loop (maybe a for() loop is better for
> this?
> Like I said, I shudder at the thought of how much this would load the server
> (especially on large rows (lots of fields) or large tables (lots of rows =
> lots of queries)), but if the layout is imperative, then maybe this is an
> option...
No load whatsoever. You just need to think about how
print "\n"; //end table on $i = 5
}
$i+5;
$grad_year=""; //clear $grad_year
}
if ($i<5) print "\n"; //end any rows with less than 5 columns
Jason Soza
- Original Message -
From: Justin French <[EMAIL PROTECTED]>
Date: Thur
On Thu, Jul 11, 2002 at 11:14:51AM -0400, Analysis & Solutions wrote:
> echo ' ';
> if ( mysql_fetch_seek($Result, $Index) ) {
> $row = mysql_fetch_row($Result);
> echo $row[0];
> } else {
> echo ' ';
> }
OOPS! I forgot to close the table cell.
On Thu, Jul 11, 2002 at 03:14:07PM +0200, [EMAIL PROTECTED] wrote:
>
> Another way of doing it is to use mysql_data_seek() to jump back and forth
> in the result set.
Now that Jason clarified what he's trying to do, Joakim is on target.
Since this data set already exists, I'd do this rather th
Andersson
> -Original Message-
> From: Jason Soza [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 11, 2002 8:05 AM
> To: PHP-General Mailing List
> Subject: [PHP] Table Making
>
>
> I'm driving myself crazy trying to visualize what I want to
> do, so I tho
I hate to think what sort of a burden this would place on ther server,
but...
You could always find out how many rows there are, then run individual
queries for each cell of the table. In other words, to achieve this layout:
1 4 7
2 5 8
3 6 9
You would do queries in this order:
1
4
7
2
5
8
3
Jason,
HTML tables will always be displayed left to right, top to bottom. This
is why you should ensure that the data from your database table comes
out in the right order. Use an ORDER BY clause in your SELECT statement.
Designing the table layout to be suitable avoids the problem you
curren
age-
> From: Analysis & Solutions [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 10, 2002 10:13 PM
> To: PHP List
> Subject: Re: [PHP] Table Making
>
>
> Jason:
>
> On Wed, Jul 10, 2002 at 10:04:45PM -0800, Jason Soza wrote:
> >
> > I have
3 4 5
6 7 8 9 10
11 12 13 14 15
I want this:
1 6 11
2 7 12
3 8 13
4 9 14
5 10 15
Thanks again for the help, though.
Jason Soza
-Original Message-
From: Analysis & Solutions [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 10:13 PM
To: PHP List
Subject: R
Martin
-Original Message-
From: Jason Soza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 4:05 PM
To: PHP-General Mailing List
Subject: [PHP] Table Making
I'm driving myself crazy trying to visualize what I want to do, so I thought
I'd share the insanity and hope for s
Jason:
On Wed, Jul 10, 2002 at 10:04:45PM -0800, Jason Soza wrote:
>
> I have this nice piece of code to take my SQL result and organize it into a
> nice 5 column table:
Nice is in the eye of the beholder... Here's what I think is nice:
echo "\n";
echo " \n";
while ($row = mysql_fetch_
I'm driving myself crazy trying to visualize what I want to do, so I thought
I'd share the insanity and hope for some advice.
I have this nice piece of code to take my SQL result and organize it into a
nice 5 column table:
print "\n"; //start table
$i=0; //define variable - av
14 matches
Mail list logo