Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
5.x-1.6
Component:
General
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2007 at 01:44 UTC
Updated:
10 Dec 2009 at 22:33 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?
Comments
Comment #1
skassam commentedI just satisfied the need for this myself. I did the following:
I hope that helps someone.
Comment #2
panchoComment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
cgjohnson commentedTHANK YOU