I have an odd problem. I tried to mass create a set of pages by using phpmyadmin. I added all the fields to the table nodes and update the sequence table. The pages all appeared - but when I edit any of them I get the message "Access Denied", "Sorry You are not authorised to view this page."
I am logged in as admin and the UID of each page is set to the admin account, so is there another table that I need to alter to give edit permission to these pages?

regards,

Mark

Comments

ax’s picture

nodes are more than records in only the node table. at least the node_revisions table also is part of nodes, probably the user table - and there might be more, depending of the node type (blog, poll, ...). see node_load():

// watch the fields fetched from tables other than node n
    $node = db_fetch_object(db_query('SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, 
      n.comment, n.promote, n.moderate, n.sticky, r.timestamp AS revision_timestamp, 
      r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data
      FROM {node} n INNER JOIN {users} u ON u.uid = n.uid 
      INNER JOIN {node_revisions} r ON r.nid = n.nid AND r.vid = %d 
      WHERE '. $cond, $arguments));
// call node type specific load, which might fetch data from other tables
    if ($extra = node_invoke($node, 'load')) {
      foreach ($extra as $key => $value) {
        $node->$key = $value;
      }
    }
// call node type specific load, which might fetch data from other tables
    if ($extra = node_invoke_nodeapi($node, 'load')) {
      foreach ($extra as $key => $value) {
        $node->$key = $value;
      }
    }
  }
// ...

you might be better of having a look at devel.module's generate-content.php and customize this to your needs.