title: mysql / nodejs error
body: <p>I have been working on fixing this problem for hours but can figure it out. </p>
  
  <pre><code>/Users/Spencer/stuq-sockets/node_modules/mysql/lib/protocol/Parser.js:82
      throw err;
            ^
  Error: ER_NO_DEFAULT_FOR_FIELD: Field 'subject' doesn't have a default value
  at Query.Sequence._packetToError (/Users/Spencer/stuq-sockets/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
  at Query.ErrorPacket (/Users/Spencer/stuq-sockets/node_modules/mysql/lib/protocol/sequences/Query.js:82:18)
  at Protocol._parsePacket (/Users/Spencer/stuq-sockets/node_modules/mysql/lib/protocol/Protocol.js:251:24)
  at Parser.write (/Users/Spencer/stuq-sockets/node_modules/mysql/lib/protocol/Parser.js:77:12)
  at Protocol.write (/Users/Spencer/stuq-sockets/node_modules/mysql/lib/protocol/Protocol.js:39:16)
  at Socket.&lt;anonymous&gt; (/Users/Spencer/stuq-sockets/node_modules/mysql/lib/Connection.js:82:28)
  at Socket.EventEmitter.emit (events.js:95:17)
  at Socket.&lt;anonymous&gt; (_stream_readable.js:745:14)
  at Socket.EventEmitter.emit (events.js:92:17)
  at emitReadable_ (_stream_readable.js:407:10)
  --------------------
  at Protocol._enqueue (/Users/Spencer/stuq-sockets/node_modules/mysql/lib/protocol/Protocol.js:135:48)
  at Connection.query (/Users/Spencer/stuq-sockets/node_modules/mysql/lib/Connection.js:184:25)
  at Object.&lt;anonymous&gt; (/Users/Spencer/stuq-sockets/setup1.js:127:12)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:906:3
  </code></pre>
  
  <p>It works for almost all of my queries except for this one and I can't figure out why.
  Could mysql be corrupt or maybe the syntax of my query?</p>
  
  <pre><code>connection.query("insert into course(title, calendar_link, 
    syllabus_link, office_hours, "
    + "instructor, website_link, lecture_times) "
    + "values(\"" + doc["courseName"] + "\", \""
    + doc["calendar"] + "\", \"" + doc["syllabus"] + "\", \""
    + doc["officeHours"] + "\", \"" + doc["instructor"] + "\", \""
    + doc["website"] + "\", \"" + doc["lectureTime"] + "\")",
    function(err, result){
    if(err) throw err;
  
    c_id = result.insertId;
  
  
    tutors = doc["tutors"];
    students = doc["students"];
  
    addTutor_AccountTable(c_id, tutors, 0, function() {
       // Add students?
       console.log('TODO: Add students');
  
    });
  
    addStudent_AccountTable(c_id, students, 0, function() {
       connection.end();
    });
  });
  </code></pre>