Mysql Query
| From: | Gerry | Date: | Fri, 22 Dec 2000 22:21:31 +0000 |
| Subject: | Mysql Query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-31630@lists.php.net to get a copy of this message | ||
Hi all,
I'm having a problem with a PHP script that uses a Mysql database.
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["name"];
$DESC = $row["description"];
if (is_int($i/3)) {
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></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++;
}