title: I have error when update SQL from node js
body: <p>I use for-loop to update sql command.</p>
  
  <p>like this</p>
  
  <pre><code>for(var i=count1; i &lt; count2;i++){        
    Book.TimeStart = Times[I]
    console.log(Book.TimeStart)
    sql = sql + `UPDATE projectroom.Details SET BookingId = `+Book.BookingId+`, status = 'W' 
    WHERE RoomID = `+Book.RoomID+` 
    and dates = '`+Book.Dates+`'
    and TimeId = (Select TimeId from projectroom.Timeslot where TimeStart = '`+Book.TimeStart+`'); \n`
  }
  </code></pre>
  
  <p>if data from JSON get in the loop only once. it's not error.</p>
  
  <p>but it gets in the loop more than one. it's error. (I config with mySQL)</p>
  
  <p>this is my error:</p>
  
  <pre><code>code: 'ER_PARSE_ERROR',
    errno: 1064,
    sqlMessage: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE projectroom.Details
  SET BookingId = 193, status = 'W' WHERE RoomID = 101 ' at line 2",
    sqlState: '42000',
    index: 0,
    sql: "UPDATE projectroom.Details SET BookingId = 193, status = 'W' WHERE RoomID = 101 and dates = '2020-03-16'and TimeId = (Select TimeId from projectroom.Timeslot where TimeStart = '09:00:00'); \n" +
      "UPDATE projectroom.Details SET BookingId = 193, status = 'W' WHERE RoomID = 101 and dates = '2020-03-16'and TimeId = (Select TimeId from projectroom.Timeslot where TimeStart = '09:30:00'); \n" +
      "UPDATE projectroom.Details SET BookingId = 193, status = 'W' WHERE RoomID = 101 and dates = '2020-03-16'and TimeId = (Select TimeId from projectroom.Timeslot where TimeStart = '10:00:00'); \n"
  }
  </code></pre>