There is an Issue in Drupal 7 regarding adding array data to your db query scripts. 

Solution

The solution is to serialize your array like this:

$qt->settings = array('setting1'=>value1, 'setting2'=>value2);
$query->values([
  $qt->machine_name,
  $qt->name,
  serialize($qt->settings),
]);
$query->execute();

 

 

Saved you some valuable time?

Buy me a drink 🍺