當前位置: 首頁>>代碼示例>>PHP>>正文


PHP rex_sql::getErrro方法代碼示例

本文整理匯總了PHP中rex_sql::getErrro方法的典型用法代碼示例。如果您正苦於以下問題:PHP rex_sql::getErrro方法的具體用法?PHP rex_sql::getErrro怎麽用?PHP rex_sql::getErrro使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在rex_sql的用法示例。


在下文中一共展示了rex_sql::getErrro方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: elseif

 * @package redaxo4
 * @version $Id: module.modules.inc.php,v 1.1 2008/03/26 13:34:13 kills Exp $
 */
$OUT = TRUE;
$function = rex_request('function', 'string');
// ---------------------------- ACTIONSFUNKTIONEN FÜR MODULE
if (!empty($add_action)) {
    $action = new rex_sql();
    $action->setTable($REX['TABLE_PREFIX'] . 'module_action');
    $action->setValue('module_id', $modul_id);
    $action->setValue('action_id', $action_id);
    if ($action->insert()) {
        $message = $I18N->msg('action_taken');
        $goon = 'ja';
    } else {
        $message = $action->getErrro();
    }
} elseif (isset($function_action) and $function_action == 'delete') {
    $action = new rex_sql();
    $action->setTable($REX['TABLE_PREFIX'] . 'module_action');
    $action->setWhere('id=' . $iaction_id . ' LIMIT 1');
    $message = $action->delete($I18N->msg('action_deleted_from_modul'));
}
// ---------------------------- FUNKTIONEN FÜR MODULE
$module_in_use_message = '';
if ($function == 'delete') {
    $del = new rex_sql();
    $del->setQuery("SELECT " . $REX['TABLE_PREFIX'] . "article_slice.article_id, " . $REX['TABLE_PREFIX'] . "article_slice.clang, " . $REX['TABLE_PREFIX'] . "article_slice.ctype, " . $REX['TABLE_PREFIX'] . "module.name FROM " . $REX['TABLE_PREFIX'] . "article_slice\r\n      LEFT JOIN " . $REX['TABLE_PREFIX'] . "module ON " . $REX['TABLE_PREFIX'] . "article_slice.modultyp_id=" . $REX['TABLE_PREFIX'] . "module.id\r\n      WHERE " . $REX['TABLE_PREFIX'] . "article_slice.modultyp_id='{$modul_id}' GROUP BY " . $REX['TABLE_PREFIX'] . "article_slice.article_id");
    if ($del->getRows() > 0) {
        $modulname = htmlspecialchars($del->getValue($REX['TABLE_PREFIX'] . "module.name"));
        for ($i = 0; $i < $del->getRows(); $i++) {
開發者ID:BackupTheBerlios,項目名稱:redaxo-svn,代碼行數:31,代碼來源:module.modules.inc.php

示例2: elseif

$goon = rex_request('goon', 'string');
$add_action = rex_request('add_action', 'string');
$info = '';
$warning = '';
$warning_block = '';
// ---------------------------- ACTIONSFUNKTIONEN FÜR MODULE
if ($add_action != "") {
    $action = new rex_sql();
    $action->setTable($REX['TABLE_PREFIX'] . 'module_action');
    $action->setValue('module_id', $modul_id);
    $action->setValue('action_id', $action_id);
    if ($action->insert()) {
        $info = $I18N->msg('action_taken');
        $goon = '1';
    } else {
        $warning = $action->getErrro();
    }
} elseif ($function_action == 'delete') {
    $action = new rex_sql();
    $action->setTable($REX['TABLE_PREFIX'] . 'module_action');
    $action->setWhere('id=' . $iaction_id . ' LIMIT 1');
    $info = $action->delete($I18N->msg('action_deleted_from_modul'));
}
// ---------------------------- FUNKTIONEN FÜR MODULE
if ($function == 'delete') {
    $del = new rex_sql();
    $del->setQuery("SELECT " . $REX['TABLE_PREFIX'] . "article_slice.article_id, " . $REX['TABLE_PREFIX'] . "article_slice.clang, " . $REX['TABLE_PREFIX'] . "article_slice.ctype, " . $REX['TABLE_PREFIX'] . "module.name FROM " . $REX['TABLE_PREFIX'] . "article_slice\r\n      LEFT JOIN " . $REX['TABLE_PREFIX'] . "module ON " . $REX['TABLE_PREFIX'] . "article_slice.modultyp_id=" . $REX['TABLE_PREFIX'] . "module.id\r\n      WHERE " . $REX['TABLE_PREFIX'] . "article_slice.modultyp_id='{$modul_id}' GROUP BY " . $REX['TABLE_PREFIX'] . "article_slice.article_id");
    if ($del->getRows() > 0) {
        $module_in_use_message = '';
        $modulname = htmlspecialchars($del->getValue($REX['TABLE_PREFIX'] . "module.name"));
        for ($i = 0; $i < $del->getRows(); $i++) {
開發者ID:BackupTheBerlios,項目名稱:redaxo-svn,代碼行數:31,代碼來源:module.modules.inc.php


注:本文中的rex_sql::getErrro方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。