The question is about these 3 tables
1/ download_keywords
- id
- name
2/ download_image
- id
- name
- description
3/ download_keyw_img
- image_id
- keyword_id
How can i get all the images that match a keyword? what query?
Any help would be highly appreciated. Thanks in advance.
Gerry.
I'm using this while loop to display the results:
$i=1;
while ($row=mysql_fetch_array($result)) {
$PIC_ID = $row["id"];
$NAAM = $row["naam"];
$DESC = $row["omschrijving"];
if (is_int($i/3)) {
echo "<TD align=center><br><a href=http://www.phpbuilder.com/board/archive/index.php/\"image_view.php?&image=$PIC_ID\"><img src=\"$CFG->imagedir/" . $PIC_ID ."_t.jpg\" width=\"100\" border=\"0\"><br>$NAAM</a><br><br></TD></tr>";
} else {
echo "<TD align=center><br><a href=\"image_view.php?&image=$PIC_ID\"><img src=\"$CFG->imagedir/" . $PIC_ID ."_t.jpg\" width=\"100\" border=\"0\"><br>$NAAM</a><br><br></TD>";
}
$i++;
}
1/ download_keywords
- id
- name
2/ download_image
- id
- name
- description
3/ download_keyw_img
- image_id
- keyword_id
How can i get all the images that match a keyword? what query?
Any help would be highly appreciated. Thanks in advance.
Gerry.
I'm using this while loop to display the results:
$i=1;
while ($row=mysql_fetch_array($result)) {
$PIC_ID = $row["id"];
$NAAM = $row["naam"];
$DESC = $row["omschrijving"];
if (is_int($i/3)) {
echo "<TD align=center><br><a href=http://www.phpbuilder.com/board/archive/index.php/\"image_view.php?&image=$PIC_ID\"><img src=\"$CFG->imagedir/" . $PIC_ID ."_t.jpg\" width=\"100\" border=\"0\"><br>$NAAM</a><br><br></TD></tr>";
} else {
echo "<TD align=center><br><a href=\"image_view.php?&image=$PIC_ID\"><img src=\"$CFG->imagedir/" . $PIC_ID ."_t.jpg\" width=\"100\" border=\"0\"><br>$NAAM</a><br><br></TD>";
}
$i++;
}