Active
Project:
Content Construction Kit (CCK)
Version:
7.x-2.x-dev
Component:
CCK in core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2011 at 11:09 UTC
Updated:
31 Aug 2011 at 07:53 UTC
Hello I'm trying to add a field with has php code to generate it's list of elementes.
<?php
$result = db_query("SELECT rid, name FROM {role} WHERE rid NOT IN (:rid)", array(
':rid' => 1, 2, 0,3)
));
$roles = array();
foreach($result as $record){
$roles[$record->nid] = $record->name;
}
return $roles;
?>
I see the select element, but I don's save nothing.
Also it give me this error:
Notice: Undefined property: stdClass::$nid in eval() (line 9 of /var/www/propios/gcms/sites/all/modules/contrib/cck/cck.module(304) : eval()'d code).Notice: Undefined property: stdClass::$nid in eval() (line 9 of /var/www/propios/gcms/sites/all/modules/contrib/cck/cck.module(304) : eval()'d code).
I'm working with php 5.3.3.x
Thanks
Oskar
Comments
Comment #1
kehan commentedthat would be a typo on your part
should be
not:
Comment #2
oskar_calvo commentedThanks a lot kehan , I don' realize about my mistake.