#include "__ifrow.h"
#include "Exception.h"
#include "MString.h"
#include "__mysql.h"
#include <stdlib.h>
#include <unistd.h>

namespace jet {
   
   __ifrow::__ifrow(coreutils::ZString &in, coreutils::MString &parent, Global &global) : Tag(in, parent, global, "else") {
      output = false;
      if(!hasContainer)
	throw coreutils::Exception("ifrow tag must have a container.");	
      if(!global.sessionExists(variables["sessionid"]))
	throw coreutils::Exception("sessionid does not exist.");
      if(global.getSession(variables["sessionid"])->hasRow()) 
	processContainer(container);
      else
	processContainer(container2);
   }
   
}
