The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Okay... I have a table called "media" full of entries stored by a primary key called "mediaID". I have another table called "media_playlist" with a primary key called "playlistID"; this table also has a comma delimited text field with entries for "mediaIDs". So it would be like:
media_playlist playlistID = 1 mediaIDs = 776, 448 Now I want to use this column for mediaIDs, and pull up information from the "media" table. Ideally, using the following code should be able to do it: Code:
SELECT media.* FROM media, media_playlist WHERE media_playlist.playlistID = "1" AND media.mediaID IN (media_playlist.mediaIDs) |
#2
|
|||
|
|||
![]()
Don't use comma delimited strings if you need to search single IDs. Normalize the table so that each playlist has more rows.
PlaylistID | mediaID 1 | 776 1 | 448 |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|