SQLfieldMap fieldmap2;
SQLfieldList emptyfieldlist;
int rows;
- int cols;
public:
MySQLresult(Module* self, Module* to, MYSQL_RES* res, int affected_rows, unsigned int id) : SQLresult(self, to, id), currentrow(0), fieldmap(NULL)
if (currentrow < rows)
{
- for (int i = 0; i < cols; i++)
+ for (int i = 0; i < Cols(); i++)
{
- fieldmap2.insert(std::make_pair(colnames[cols],GetValue(currentrow, i)));
+ fieldmap2.insert(std::make_pair(colnames[i],GetValue(currentrow, i)));
}
currentrow++;
}
{
fieldlist->push_back(fieldlists[currentrow][i]);
}
+ currentrow++;
}
return fieldlist;
}
if (currentrow < rows)
{
- for (int i = 0; i < cols; i++)
+ for (int i = 0; i < Cols(); i++)
{
- fieldmap->insert(std::make_pair(colnames[cols],GetValue(currentrow, i)));
+ fieldmap->insert(std::make_pair(colnames[i],GetValue(currentrow, i)));
}
currentrow++;
}
virtual void Free(SQLfieldList* fl)
{
- /* XXX: Yes, this is SUPPOSED to do nothing, we
- * dont want to free our fieldlist until we
- * destruct the object. Unlike the pgsql module,
- * we only have the one.
- */
delete fl;
}
};