I am working on a Drupal 6 site and have very limited knowledge of writing sql queries.
I have a content type manage_current_university (which is a content profile) and in that use a taxonomy cck field field_host_university. I am generating a table of users who have signed for a content.
If I write this query in phpMyAdmin, I get the correct tid for that user
SELECT field_host_university_value FROM node n INNER JOIN content_type_manage_current_university mcu ON n.nid = mcu.nid WHERE n.uid =120;
Replicating the same query inside a module:
$currentuniversity_query = db_query("SELECT field_host_university_value FROM node n INNER JOIN content_type_manage_current_university mcu ON n.nid = mcu.nid
WHERE n.uid =".$uid."");
while($currentuniversity_result = db_fetch_object($currentuniversity_query)){
$currentuniversity = $currentuniversity_result->value;
print $currentuniversity; }
Where $uid fetches $user->uid of signed up users.
But the table column is blank for this one. Using similar query to fetch other profile values of the signed up user works.
Please help!