I have an insert hook that catches nodes whenever the user adds a node. So here's my code:
function blah_insert($node){
$record = array(
'nid' => (int) $node->nid
);
drupal_write_record('table_name', $record);
}
schema::
table_name(
nid int primary key not null
)
Performing a check on the return value of drupal_write_record results in FALSE. db_query doesn't work either. var_dump confirms that all the fields are where they're supposed to be.
The nodes are properly being inserted into the node tables but not the table that is defined by the schema in my install file (not written like the schema that I have above of course - nid is defined as an int and all other relevant fields).
Does anyone have any idea as to what's going on?