Selecting twice from the same table

From: Date: Thu, 13 Sep 2001 13:27:22 +0000
Subject: Selecting twice from the same table
Groups: php.db 
Request: Send a blank email to php-db+get-12407@lists.php.net to get a copy of this message
Hello, Okay this will probably be confusing, but I'll do my best. Please don't try and question my database structure, I have my reasons and at this point it is deffinately not going to change. I have many different types of data stored in a main table the structure of main is as follows main ---------- ID autonumber content_ID enum('artist','song','album',user function','genre', etc.) name char img char des char etc. etc. now on top of main, I have a few other tables that contain additional fields specific to a given content_ID. for instance: songs ----------- main_ID ( link to main table) int artist_ID (link to parent) int length (length of song) char size (size of file) char file (file location) char etc. etc. Now my goal is to take a given number of songs say 10 songs of various artists and get a list like: artist 1 song1 - length - size song2 - length - size song3 - length - size artist 2 song1 - length - size song2 - length - size song3 - length - size Thanks for ure help -- Best regards, Jacob Singh Pajama Design (413)582-9342 2 Belanger Pl. Northampton, MA 01060 mailto:junk@balances.com

« previous php.db (#12407) next »