
Mam dwie tabele w bazie
galerie
| g_id | g_nazwa |
1 Wizualizacje_3D
2 Modele_3D
3 Projektowanie_3D
pod_galerie
| pg_id | pg_tytul | pg_tresc | g_id | thumb | big |
i teraz jak to wyświetlić łącząc? mam taki kod
<?php $host = "localhost"; $user = "artddxml3"; $pass = "pomier123"; $database = "artddxml3"; //odczyt// $query="SELECT galerie.g_nazwa, pod_galerie.pg_tytul, pod_galerie.pg_tresc, thumb, big FROM galerie, pod_galerie WHERE galerie.g_id=pod_galerie.g_id AND galerie.g_id = $id"; $return.='<image Thumb="'.$row['thumb'].'"' . 'Large="'.$row['big'].'"' . 'Caption="'.$row['pg_tytul'].'"> <copy><![CDATA['.$row['pg_tresc'].']]></copy> </image>'; } $return.='</gallery>'; $return.='</content>'; //koniec ?>