Greetings!
I am trying to store a QStringList into MySQL, but it always executes the query without the string list itself.
Qt Code:
  1. query.clear(); // make sure the query is empty
  2. QStringList ports;
  3. ports << "first" << "second" << "third";
  4. query.prepare("INSERT INTO switches(model,address,location,nas_ip,voltage,notes,ports) "
  5. "VALUES ('1','3','test',INET_ATON('10.0.0.3'),220,'test',?)");
  6. query.addBindValue(ports);
  7. qDebug() << query.boundValue(0); // this returns the qstringlist as it should
  8. query.exec();
  9. qDebug() << query.executedQuery(); // this displays "INSERT INTO switches(model,address,location,nas_ip,voltage,notes,ports) VALUES ('1','3','test',INET_ATON('10.0.0.3'),220,'test',?)"
To copy to clipboard, switch view to plain text mode 
I tried using a placeholder and bindValue but the result is almost the same, instead of "?" the executed query contains the placeholder
the ports field is a BLOB field. Any thoughts? Thanks in advance!