function getSQL($format = NULL, $sqlArray = NULL)
{
if (!is_array($sqlArray)) {
$sqlArray = $this->sqlArray;
}
if (!is_array($sqlArray)) {
return FALSE;
}
switch (strtolower($format)) {
case 'string':
case 'text':
return !empty($sqlArray) ? implode(";\n\n", $sqlArray) . ';' : '';
case 'html':
return !empty($sqlArray) ? nl2br(htmlentities(implode(";\n\n", $sqlArray) . ';')) : '';
}
return $this->sqlArray;
}