Jump to content

All pictures, normal or faded, depeding on if question answered


LLeoun

Recommended Posts

Dear  people,

 

My friends are recording videos and uploading them into my webpage. They are answering with these videos questions that I am asking to them. The video itself goes to a folder and its name, type, size, path, keyword and number go to a MySql table called videos.

 

In the videos table, the name of the video is a keyword and a number all together plus its extension. The number is the same one as the id_friend in the friend’s table. And the keyword is the keyword for the question. If I am asking about their favourite band, the keyword will be ‘band’. 

 

In the friends table I have my friends' name and two pictures of them. A normal one (pic_friend) and a faded one (pic_friend_fade).

 

What I want to do is to create a page for each question so I can show their video-answers.

Then in the question page I want to show all their pictures. The normal picture and the link to a page with the video if there's a video-answer from them, and a faded picture and no link if there's no video-answer from them.

 

I've been trying for a long time and I'm going mad. I can do the link to the page with the video, but I cannot do the pictures thing for each question .. please help!

Thanks a million in advance!!

 

Here are the two tables:

 

CREATE TABLE friends (

id INT NOT NULL AUTO_INCREMENT,

id_friend INT NOT NULL,

name VARCHAR(30) NOT NULL,

pic_friend VARCHAR(255) NOT NULL,

pic_friend_fade VARCHAR(255) NOT NULL,

PRIMARY KEY(id)

);

 

 

CREATE TABLE videos (

id INT NOT NULL AUTO_INCREMENT,

name VARCHAR(30) NOT NULL,

type VARCHAR(30) NOT NULL,

size INT NOT NULL,

path VARCHAR(60) NOT NULL,

keyword VARCHAR(30) NOT NULL,

number INT NOT NULL,

PRIMARY KEY(id)

);

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.