I have a table with 16 columns. I perform a SELECT
using the QSqlQuery
class. I get two rows as expected, but only the first 2 columns out of the 16.
Here is a simplified version of the query
QSqlQuery query(f_db);
query.prepare(QString("SELECT * FROM my_table WHERE status = 'good'");
query.exec();
query.next();
int const max(query.size()); // here max == 2 instead of 16
for(int idx(0); idx < max; ++idx)
{
QVariant v(it->second->value(idx));
...v is correct for column 1 and 2...
}
Any idea why MySQL would not return all 16 columns.