Jump to content

select extra data


jonniejoejonson

Recommended Posts

I have a mediaTable, to store info about images, video, text, audio.

 

mediaId

mediaType

mediaFilename

mediaTitle

 

I want to

 

SELECT * FROM mediaTable WHERE mediaId=’12’;

 

However… if the mediaType selected was ‘video’, i would like to join to the video table to get some extra data.. how would you do this?

….or would you just run to 2 sql statements?

Alternatively would you recommend simply having an image table, a video table, audio table, rather than a media table

Kind regards J

 

Link to comment
https://forums.phpfreaks.com/topic/231082-select-extra-data/
Share on other sites

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.