Hi Jerry,
Ahh, ok, I see where you're going with this. You're pretty much working with MySQL at this point to get the data you want out of the database. Try this:
$accountsSubquery = "SELECT num FROM {$TABLE_PREFIX}accounts WHERE `use_large_banners` = '1' ";
$uploadsWhere = " tableName = 'accounts' AND fieldName = 'large_banners' AND recordNum IN ($accountsSubquery)";
$records = mysql_select('uploads', $uploadsWhere);
// debug - show output
showme($records);
print "Done";
exit;
If you were going to write that as a straight MySQL query it would look something like this:
SELECT * FROM cms_uploads
WHERE tableName = 'accounts'
AND fieldName = 'large_banners'
AND recordNum IN (SELECT num FROM cms_accounts WHERE `use_large_banners` = '1')
Let me know if that works for you or if you have any questions about how it works. Cheers!
Dave Edis - Senior Developer
interactivetools.com