Beispiel #1
0
function _sql_execute($sql)
{
    $sqls = _sql_split($sql);
    if (is_array($sqls)) {
        foreach ($sqls as $sql) {
            if (trim($sql) != '') {
                Loader::model('get_model')->execute($sql);
            }
        }
    } else {
        Loader::model('get_model')->execute($sql);
    }
    return true;
}
Beispiel #2
0
function _sql_execute($sql, $r_tablepre = '', $s_tablepre = 'phpcms_')
{
    $sqls = _sql_split($sql, $r_tablepre, $s_tablepre);
    if (is_array($sqls)) {
        foreach ($sqls as $sql) {
            if (trim($sql) != '') {
                mysql_query($sql);
            }
        }
    } else {
        mysql_query($sqls);
    }
    return true;
}