Relationship or not.
| From: | Bruce Levick | Date: | Fri, 10 Jan 2003 04:39:36 +0000 |
| Subject: | Relationship or not. | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-24737@lists.php.net to get a copy of this message | ||
I have a bit of a challenge on and only being a newbie I will need to
call on some experienced PHP'ers.
I have two tables in a databse. "Tasks" and "Files". They relate to each
other via Tasks.ID and Files.FID.
I have successfully created an uploading form which adds images to a
directory and records the files details into the "files" table. So I can
now display the results If I need to from the "files" table.
My challenge is this.
I have created a Result set which displays all the "Tasks". This
displays through a repeated row and so on.
What I need to do is some sort of an if statement in each task display.
If (there are "files.fid" that relate to this "tasks.ID"){
Display results !!! //Calls on some HTML/PHP and attatchs "file" info to
a generic image to click on.
}
Else {
Display Nothing !!!
}
So to put it simple. I need to display all the tasks (got that) and also
the file info that realtes to each task. I am unsure of how to code this
relational stuff. A bit out of my reach at the moment.
Cheers
Bruce