Active
Project:
Node Profile
Version:
5.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2007 at 01:38 UTC
Updated:
24 Oct 2007 at 01:38 UTC
I'm using CCK and Node Profile, and I'm trying to figure out the php code to pull a default value from another field that users would have filled in previously. This is the code that I've gotten so far:
global $user;
$desired_result = db_query("SELECT field_value FROM {content_type_table} INNER JOIN node ON (content_type_table.nid = node.nid) WHERE (node.uid = $user->uid)");
return array(
array(
'value' => print $desired_result
)
);The problem is that it only returns the number 1 no matter how I tweak this code. Does anyone know where I'm going wrong?