View Single Post
  #1 (permalink)  
Old 04-05-06, 12:35 AM
0o0o0 0o0o0 is offline
Wannabe Coder
 
Join Date: Jul 2005
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Pretty simple ( i think) question any help!?!?

I have a question that may be fairly simple. But I cant figure it out.

I am using...

PHP Code:

$query "SELECT `*` FROM `LIST` where `Genre` =  $tResult $ord LIMIT $from$max_results";  


 
$result mysql_query($query)

      or die (
"Couldn't execute query.");   

  while (
$row mysql_fetch_array($result))   
 {
  
extract($row); 
in my script. Ive used it before it runs great for line after line output. In "A" single table with each result showing the various info I need.

But! now im making a sort of same concept yet two tables first one is red and the next "below it" is Yellow ( also with the information in the tables).

Need the loop! but need the loop to put line 1 in the red table, then line 2 in the yellow table.. THEN LOOP... so line 3 will be int he next red table and line 4 in the yellow after that and so on.. But a single red table and below it a single yellow table.. that loops over and over red yellow red yellow red yellow.. while adding line 1, 2, 3, etc etc .. in each.

lets say.... (red table) bla bla 1998 model make (red)
next table (Yellow Table)bla bla 1999 model make (Yellow)
next table (red) bla bla 1992 model make (red)
next table (Yellow)bla bla 1993 model make (Yellow)
next table (red) bla bla 1994 model make (red)
next table (Yellow)bla bla 1994 model make (Yellow)
next table (red) bla bla 1993 model make (red)

you get the idea, the problem is..

I get doubles.. (red table) line 1 info(red table)
and yellow (yellow table) duplicates reds above not outputing line 2 from the database(Y table)


Hope your following me lol..

all I am trying to get is.. red table with line1 info in it, next below yellow table with line 2 info in it.. next below red table again with line 3 in it, next below that again a yellow table with line 4 contents in it.

without line one ending up in the red table and the yellow table, then line 2 in the red table and the yellow table.

Any ideas? or are you thinking.. is this guy on crack? hopefully you understand whats happening

and thanks for your help!!!

Last edited by 0o0o0; 04-05-06 at 12:38 AM.
Reply With Quote