* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Init SQLs array
function initSqls () {
- setSqlsArray(array());
+ // Init generic array
+ setSqlsArray(array('generic' => array()));
}
-// Checks wether the sqls array is initialized
+// Checks whether the sqls array is initialized
function isSqlsInitialized () {
return ((isset($GLOBALS['sqls'])) && (is_array($GLOBALS['sqls'])));
}
// Add an SQL to the list
function addSql ($sql) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("sql=%s, count=%d", $sql, countSqls()));
- $GLOBALS['sqls']['generic'][] = (string) $sql;
+ array_push($GLOBALS['sqls']['generic'], $sql);
}
// Merge SQLs together
return $count;
}
-// Checks wether the SQLs array is filled
+// Checks whether the SQLs array is filled
function isSqlsValid () {
//* DEBUG: */ debugOutput(__FUNCTION__ . ':' . intval(isSqlsInitialized()) . '/' . countSqls() . '/' . getCurrentExtensionName());
return (
$SQL .= sprintf('%01.5f', $value);
} else {
// Everything else might be a string, so add ticks around it
- $SQL .= "'" . SQL_ESCAPE($value) . "',";
+ $SQL .= chr(39) . SQL_ESCAPE($value) . chr(39) . ',';
}
} // END - foreach