RE: [PHP-DB] Relationship or not.

From: Date: Fri, 10 Jan 2003 04:41:56 +0000
Subject: RE: [PHP-DB] Relationship or not.
Groups: php.db 
Request: Send a blank email to php-db+get-24738@lists.php.net to get a copy of this message
I forgot to mention there will likely be more than the one "file" that relates to a task. -----Original Message----- From: Bruce Levick Sent: Friday, January 10, 2003 2:40 PM To: php-db@lists.php.net Subject: [PHP-DB] Relationship or not. 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

« previous php.db (#24738) next »