[thelist] Looping through the results of a one - to - many - to - many query with PHP

john corry john at neoncowboy.com
Sat Feb 16 18:59:01 CST 2002


Hi Y'all,

I'm kind of confused. I have a query that requests rows from three
tables...When the results come back, I get 9 rows returned..Like this:

Kihei Surfside, Kihei Surfside is an excellent property for beach ...,
kihei_surfside_ext.jpg, 3 ,135.00 ,110.00 ,125.00 ,135.00
Kihei Surfside, Kihei Surfside is an excellent property for beach ...,
kihei_surfside_ext.jpg, 6 ,150.00 ,120.00 ,140.00 ,150.00
Kihei Surfside, Kihei Surfside is an excellent property for beach ...,
kihei_surfside_ext.jpg, ,10 ,205.00 ,165.00 ,190.00 ,205.00

Kihei Surfside, Kihei Surfside is an excellent property for beach ...,
kihei_surfside_ext_small.jpg, 3 ,135.00 ,110.00 ,125.00 ,135.00
Kihei Surfside, Kihei Surfside is an excellent property for beach ...,
kihei_surfside_ext_small.jpg, 6 ,150.00 ,120.00 ,140.00 ,150.00
Kihei Surfside, Kihei Surfside is an excellent property for beach ...,
kihei_surfside_ext_small.jpg, ,10 ,205.00 ,165.00 ,190.00 ,205.00

Kihei Surfside, Kihei Surfside is an excellent property for beach ...,
kihei_surfside_int.jpg, 3 ,135.00 ,110.00 ,125.00 ,135.00
Kihei Surfside, Kihei Surfside is an excellent property for beach ...,
kihei_surfside_int.jpg, 6 ,150.00 ,120.00 ,140.00 ,150.00
Kihei Surfside, Kihei Surfside is an excellent property for beach ...,
kihei_surfside_int.jpg, ,10 ,205.00 ,165.00 ,190.00 ,205.00

So...I need to format all this data...
basically, I need to turn it into the output you see at
http://www.maui.net/~mchr/kihei.com/kihei_beach.html . Title and Description
once, images for as many images as there are (2), the floorplan graphic, and
the table for rates. I know how to do any one of these steps, but properly
nesting conditional statements to only output the right stuff in the right
place is just beyond my imagination...

thanks,
John Corry




More information about the thelist mailing list