Help with a simple PHP/MySQL query

theprogressive - August 17, 2008 - 17:23

This is probably a PHP 101 question... but I haven't finish that course yet. :)

I'm working with four tables.

Users -- contains UID (user id), NAME (name), and PICTURE (picture)
Blog_Info -- contains FID (feed id) and UID (user id)
Aggregator_Items -- contains FID (feed id) and TITLE (the title of the item)
UserFeedChoices -- an array (1,2,3, etc.) of feeds

What I a want is a query that will generate a list of say 10 Aggregator Items under each user's name and picture -- for each of the UserFeedChoices.

Like this:

Aggregator items by Fred (UserFeedChoices 1)
---
Item 1
Item 2
Item 3

Aggregator items by Jand (UserFeedChoices 2)
---
Item 1
Item 2
Item 3

and so on...

--

Anyone who helps promptly gets my everlasting thanks -- and a gift card for iTunes or Amazon -- not as payment, but just for being cool!

Thanks!

 
 

Drupal is a registered trademark of Dries Buytaert.