Relationship or not.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux