JetCore/__whilerow.cpp
2024-09-25 20:10:19 -07:00

34 lines
958 B
C++

#include "__whilerow.h"
#include "Exception.h"
#include <iostream>
namespace jet {
__whilerow::__whilerow(coreutils::ZString &in, coreutils::MString &parent, Global &global) : Tag(in, parent, global) {
if(!variableDefined("host"))
throw coreutils::Exception("host must be specified for mysql tag.");
if(!variableDefined("database"))
throw coreutils::Exception("database must be specified for mysql tag.");
if(!variableDefined("user"))
throw coreutils::Exception("user must be specified for mysql tag.");
if(!variableDefined("password"))
throw coreutils::Exception("password must be specified for mysql tag.");
while ((count != 0) && sql[sqlsession].row) {
processContainer(container);
sql[sqlsession].row = mysql_fetch_row (sql[sqlsession].result);
sql[sqlsession].fieldlen = mysql_fetch_lengths (sql[sqlsession].result);
--count;
}
}
}