Finished up whilerow. Added hearder tag.
This commit is contained in:
1 parent
a09e370e57
commit
3db9227adc
12 files changed
+106
-25
No files matched your search
+7
-20
@@ -1,32 +1,19 @@
|
||||
#include "__whilerow.h"
|
||||
#include "Exception.h"
|
||||
#include "__mysql.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;
|
||||
}
|
||||
|
||||
|
||||
int count = variables["count"].asInteger();
|
||||
|
||||
|
||||
while ((count != 0) && global.getSession(variables["sessionid"])->hasRow()) {
|
||||
processContainer(container);
|
||||
global.getSession(variables["sessionid"])->nextRow();
|
||||
--count;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user