By gleble on
I am working with the node_access_example.module
It gives the following database definition
CREATE TABLE node_access_example (
nid int(10) unsigned NOT NULL default '0' PRIMARY KEY,
private int,
KEY `node_example_nid` (nid)
)
I have used the following to create the table but I am sure it is incorrect because I don't understand the syntax above.
function node_access_example_schema() {
$schema['annotations'] = array(
'description' => t('Stores node annotations that users write.'),
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'primary key' => 'private int',
'key' => `node_example_nid`,
),
),
);
return $schema;
}
Can anybody tell me the right way to do this please.
Comments
stuck
Can some one please help, I'm stuck untill I sort this database table out.