D7 db_insert() error

Firstly, a few housekeeping items:
– I am new to Drupal.
– Explanations are greatly appreciated.
– I am using Drupal 7.59 due to working with a pre-existing install.
– The only module I have installed is the PHP filter.

I’ve spent two days researching, educating myself, and trialling numerous example codes and before deciding to post.

The goal:
To insert data into a custom table in the database created by the Drupal install.

The problem:
Upon previewing the following example code, I am met with an 404 error:

<?php
$nid = db_insert('node') // Table name no longer needs {}
->fields(array(
  'title' => 'Example',
  'uid' => 1,
  'created' => REQUEST_TIME,
))
->execute();
?>

I have narrowed the issue down to the "->execute();" portion of the code.

While I know using db_query for inserting is an incorrect process, I have tried the following without success:

<?php
$result = db_query('INSERT INTO {node} ('nid', 'title') VALUES ('9', 'example'));
?>

Upon previewing the following code, an entry is successfully made:

<?php
$data = array(
  'title' => 'Example',
  'uid' => 1,
  'created' => REQUEST_TIME,
);
drupal_write_record('node', $data);
?>

However, I have copied the ‘node’ table to ‘node1’ and changed the write record location as follows:

<?php
$data = array(
  'title' => 'Example',
  'uid' => 1,
  'created' => REQUEST_TIME,
);
drupal_write_record('node1', $data);
?>

Oddly, this does not update the ‘node1’ table, even though the table is a direct copy of the ‘node’ table.

I have tried the following which works:

<?php
$table_name = 'node'; 
$data->title = 'example';
$data->uid = '99';
drupal_write_record($table_name, $data);
?>

However, it did not work when I changed the table name:

<?php
$table_name = 'node1'; 
$data->title = 'example';
$data->uid = '99';
drupal_write_record($table_name, $data);
?>

I think I have racked my brain long enough. Any and all help is appreciated!

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed