当前位置: 首页>>代码示例>>PHP>>正文


PHP sql::where方法代码示例

本文整理汇总了PHP中sql::where方法的典型用法代码示例。如果您正苦于以下问题:PHP sql::where方法的具体用法?PHP sql::where怎么用?PHP sql::where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sql的用法示例。


在下文中一共展示了sql::where方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: deleteMessage

 function deleteMessage($message_id)
 {
     // reply
     $r_sql = new sql();
     $r_sql->setQuery("select * from rex_5_board where message_id='{$message_id}' and board_id='" . $this->boardname . "'");
     if ($r_sql->getRows() == 1) {
         if ($r_sql->getValue("re_message_id") != 0) {
             // reply
             $ur_sql = new sql();
             $ur_sql->setTable("rex_5_board");
             $ur_sql->where("message_id='{$message_id}'");
             $ur_sql->setValue("status", 0);
             $ur_sql->update();
             $message_id = $r_sql->getValue("re_message_id");
             // update topic
             $u_sql = new sql();
             $u_sql->setQuery("select * from rex_5_board where re_message_id='{$message_id}' and status='1'");
             $u_sql->setTable("rex_5_board");
             $u_sql->where("message_id='{$message_id}'");
             $u_sql->setValue("replies", $u_sql->getRows());
             $u_sql->update();
             $this->msg["bb_msg_id"] = $r_sql->getValue("re_message_id");
             $return = $this->showMessage();
         } else {
             // topic
             $u_sql = new sql();
             $u_sql->setTable("rex_5_board");
             $u_sql->where("message_id='{$message_id}' or re_message_id='{$message_id}'");
             $u_sql->setValue("status", 0);
             $u_sql->update();
             $this->errmsg = $this->text[250];
             $return = $this->showMessages();
         }
     } else {
         $this->errmsg = $this->text[260];
         $return = $this->showMessages();
     }
     return $return;
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:39,代码来源:class.rex_com_board.inc.php

示例2: array

         rex_newArtPrio($category_id, $key, 0, $Position_New_Article);
     }
     rex_generateArticle($id);
     // ----- EXTENSION POINT
     $message = rex_register_extension_point('ART_ADDED', $message, array("id" => $id, "status" => 0, "name" => $article_name, "re_id" => $category_id, "prior" => $Position_New_Article, "path" => $KATPATH, "template_id" => $template_id));
 } else {
     if (isset($function) and $function == "edit_article" && $article_id != "" && $KATPERM) {
         // --------------------- ARTIKEL EDIT
         $Position_Article = (int) $Position_Article;
         if ($Position_Article == 0) {
             $Position_Article = 1;
         }
         $amessage = $I18N->msg("article_updated");
         $EA = new sql();
         $EA->setTable($REX['TABLE_PREFIX'] . "article");
         $EA->where("id='{$article_id}' and clang={$clang}");
         $EA->setValue("name", $article_name);
         $EA->setValue("template_id", $template_id);
         // $EA->setValue("path",$KATPATH);
         $EA->setValue("updatedate", time());
         $EA->setValue("updateuser", $REX_USER->getValue("login"));
         $EA->setValue("prior", $Position_Article);
         $EA->update();
         // ----- PRIOR
         rex_newArtPrio($category_id, $clang, $Position_Article, $thisArt->getValue("prior"));
         rex_generateArticle($article_id);
         // ----- EXTENSION POINT
         $message = rex_register_extension_point('ART_UPDATED', $message, array("id" => $article_id, "status" => $thisArt->getValue("status"), "name" => $article_name, "clang" => $clang, "re_id" => $category_id, "prior" => $Position_Article, "path" => $KATPATH, "template_id" => $template_id));
     } elseif (isset($function) and $function == "delete_article" && $article_id != "" && $KATPERM && !$REX_USER->isValueOf("rights", "editContentOnly[]")) {
         // --------------------- ARTIKEL DELETE
         $message = rex_deleteArticle($article_id);
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:structure.inc.php

示例3:

 } else {
     $thumbnail = $REX_MEDIA_1;
 }
 $sql->setValue("thumbnail", $thumbnail);
 if ($REX_MEDIA_2 == "delete file") {
     $picture = "";
 } else {
     $picture = $REX_MEDIA_2;
 }
 $sql->setValue("picture", $picture);
 $sql->setValue("relation_1", $article[relation_1]);
 $sql->setValue("relation_2", $article[relation_2]);
 $sql->setValue("relation_3", $article[relation_3]);
 if ($aid != "") {
     // ----> update eines Artikels
     $sql->where("id='" . $aid . "' AND clang='{$clang}'");
     $sql->update();
     if (strlen($sql->error) > 3) {
         echo preg_replace("!##msg##!", $I18N_SIMPLE_SHOP->msg("error"), $message_corpus);
     } else {
         echo preg_replace("!##msg##!", $I18N_SIMPLE_SHOP->msg("product_saved"), $message_corpus);
         if ($uebernehmen) {
             $send = 0;
             $function = "edit_article";
         } else {
             $send = 1;
             $function = "";
         }
     }
     $sql->flush();
     $sql->setTable("rex_4_article");
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:31,代码来源:articles.inc.php

示例4: moveArticle

 if ($FUNC_MOVE != "" && $func_category_id > 0 && $REX_USER->isValueOf("rights", "advancedMode[]")) {
     if ($article->getValue("startpage") == 1) {
         $err_msg = $I18N->msg('article_cannot_be_moved') . " " . $I18N->msg('start_article_has_to_stay_in_category');
     } else {
         $err_msg = moveArticle($article_id, $func_category_id, $category_id);
         $category_id = $func_category_id;
     }
 } elseif ($FUNC_COPY != "" && $func_category_id > 0 && $REX_USER->isValueOf("rights", "advancedMode[]")) {
     copyArticle($article_id, $func_category_id);
     $err_msg = $I18N->msg('article_copied');
 }
 if ($save == "1") {
     #$debugsql = 1;
     $meta_sql = new sql();
     $meta_sql->setTable("rex_article");
     $meta_sql->where("id='{$article_id}'");
     $meta_sql->setValue("online_von", $jahr_von . $monat_von . $tag_von);
     $meta_sql->setValue("online_bis", $jahr_bis . $monat_bis . $tag_bis);
     $meta_sql->setValue("suchbegriffe", $suchbegriffe);
     $meta_sql->setValue("beschreibung", $beschreibung);
     $meta_sql->setValue("name", $article_name);
     $meta_sql->setValue("type_id", $type_id);
     $meta_sql->setValue("checkbox01", $checkbox01);
     // -------------------------- FILE UPLOAD META BILD/FILE
     $FILE = "METAFILE";
     $FILEDEL = "METAFILEDEL";
     if ($METAFILE != "" and $METAFILE != "none") {
         $FILENAME = "METAFILE_name";
         $FILESIZE = "METAFILE_size";
         $FILETYPE = "METAFILE_type";
         $NFILENAME = "";
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:content.inc.php

示例5: elseif

    }
} elseif ($func == "edit") {
    $s = new sql();
    $s->setQuery("select * from rex_opf_lang where id='" . $oid . "'");
    if ($s->getRows() == 0) {
        $msg = "";
    } else {
        $SF = true;
        $msg = "";
        if (isset($_REQUEST["opfname"])) {
            $msg = "Value saved.";
            $SF = false;
            $sv = new sql();
            // $sv->debugsql = 1;
            $sv->setTable("rex_opf_lang");
            $sv->where("id='" . $oid . "'");
            $sv->setValue("name", trim($_REQUEST["opfname"]));
            $sv->update();
        }
        if ($msg != "") {
            echo rex_opf_msg($msg);
        }
        if ($SF) {
            echo "<table style='width: 770px' cellpadding=5 cellspacing=1 border=0 class=rextbl>";
            echo "<form action=index.php method=post><input type=hidden name=oid value={$oid}><input type=hidden name=clang value=" . $clang . "><input type=hidden name=page value=" . $mypage . "><input type=hidden name=func value=" . $func . " />";
            // echo "<tr><th colspan=2 align=left class=dgrey>Schnipsel hinzufuegen</th></tr>";
            echo "<tr><td class=grey width=150>New value</td><td class=grey><textarea cols=30 rows=2 name=opfname class=inp100>" . htmlspecialchars($s->getValue("name")) . "</textarea></td></tr>";
            echo "<tr><td class=grey>Replace value</td><td class=grey>" . htmlspecialchars($s->getValue("replacename")) . "</td></tr>";
            echo "<tr><td class=dgrey>&nbsp;</td><td class=dgrey><input type=submit value=add></td></tr>";
            echo "</table><br />";
        }
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:31,代码来源:index.inc.php

示例6: foreach

        print "<option value={$var['id']}>{$var['name']}</option>\n";
    }
    print "</select>";
    print "<br><br><input type=submit value='Import Folder'>";
    print "</td></tr>";
    print "</table>";
    print "</form>";
}
// *************************************** EXTRA FUNCTIONS
if ($PERMALL && isset($media_method) and $media_method == 'updatecat_selectedmedia') {
    if (is_array($_POST["selectedmedia"])) {
        foreach ($_POST["selectedmedia"] as $file_id) {
            $db = new sql();
            // $db->debugsql = true;
            $db->setTable($REX['TABLE_PREFIX'] . 'file');
            $db->where("file_id='{$file_id}'");
            $db->setValue('category_id', $rex_file_category);
            $db->setValue("updatedate", time());
            $db->setValue("updateuser", $REX_USER->getValue("login"));
            $db->update();
            $msg = $I18N->msg('pool_selectedmedia_moved');
        }
    } else {
        $msg = $I18N->msg('pool_selectedmedia_error');
    }
}
if ($PERMALL && isset($media_method) and $media_method == 'delete_selectedmedia') {
    if (is_array($_POST["selectedmedia"])) {
        $msg = "";
        foreach ($_POST["selectedmedia"] as $file_id) {
            //kopiet von Dateidetails delete_file
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:medienpool.inc.php

示例7: sql

 function save_css($cssFile = false, $cssDir, $styles)
 {
     $style_arr = $this->parse_css($styles);
     global $REX_USER;
     $FILESQL = new sql();
     $FILESQL->setQuery("select * from rex_file where filename='{$cssFile}'");
     if ($FILESQL->getRows() == 1) {
         $openFile = fopen($cssDir . $cssFile, "w");
         fputs($openFile, $styles);
         fclose($openFile);
         $FILESIZE = filesize($cssDir . $cssFile);
         //if($upload) {
         @chmod($cssDir . "/{$NFILENAME}", 0777);
         //$FILESQL->debugsql=1;
         $FILESQL->setTable("rex_file");
         $FILESQL->where("filename='{$cssFile}'");
         //$FILESQL->setValue("filetype",$FILETYPE);
         $FILESQL->setValue("filesize", $FILESIZE);
         $FILESQL->setValue("updatedate", time());
         $FILESQL->setValue("updateuser", $REX_USER->getValue("login"));
         $FILESQL->update();
         $ok = 1;
         //}
     } elseif ($FILESQL->getRows() > 1) {
         $this->errorMsg .= 'Es gibt mehere Dateinamen mit ' . $cssFile . ' in der Datenbank';
     } else {
         $this->errorMsg .= 'Dateinamen ' . $cssFile . ' im Medienpool nicht gefunden';
     }
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:29,代码来源:class.editor.inc.php

示例8: confirm

                echo "<input type=submit name=delclang value=delete onclick='return confirm(\"" . $I18N->msg('delete') . " ?\")'>";
            }
            echo "</td>";
            echo "</form></tr>";
        } else {
            echo "<tr>" . "<td></td>" . "<td align=center>" . key($REX[CLANG]) . "</td>" . "<td><a href=index.php?page=specials&spage=lang&func=editclang&clang_id=" . key($REX[CLANG]) . "#clang>" . htmlentities(current($REX[CLANG])) . "</a></td>" . "<td></td></tr>";
        }
        next($REX[CLANG]);
    }
    echo "</table>";
} else {
    // ----- eigene typen definieren
    if ($function == "Update" or $function == "Ändern") {
        $update = new sql();
        $update->setTable("rex_article_type");
        $update->where("type_id='{$type_id}'");
        $update->setValue("name", $typname);
        $update->setValue("description", $description);
        $update->update();
        $type_id = 0;
        $function = "";
        $message = $I18N->msg("article_type_updated");
    } elseif ($function == "Delete" or $function == "Löschen") {
        if ($type_id != 1) {
            $delete = new sql();
            $result = $delete->get_array("SELECT name,id FROM rex_article WHERE type_id = {$type_id}");
            if (is_array($result)) {
                $message = $I18N->msg("article_type_still_used") . "<br>";
                foreach ($result as $var) {
                    $message .= "<br><a href=index.php?page=content&article_id=" . $var[id] . "&mode=meta target=_blank>" . $var[name] . "</a>";
                }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:specials.inc.php

示例9: sql

        $file = $_POST['fileCreate'];
    }
    $catId = $_POST['dirCreate'];
    $create = new css_style();
    $create->create_file($file, $cssDir, $catId);
    $debug = $create->debug();
    $debugErrorMsg = $create->debug_errorMsg();
    $debugSuccessMsg = $create->debug_successMsg();
    $textarea = "/* Hier können Sie nun Styles einfügen */";
    $highlight = "/* Hier können Sie nun Styles einfügen */";
}
if (isset($_POST['delete']) and isset($_POST['fileDelete'])) {
    $fileDelete = $_POST['fileDelete'];
    $sql = new sql();
    $sql->setTable("rex_file");
    $sql->where("filename = '{$fileDelete}'");
    $sql->delete();
}
if (isset($_POST['save']) or isset($_POST['update']) and isset($_POST['fileEdit']) and $_POST['fileEdit'] != "") {
    $file = $_POST['fileEdit'];
    $styles = $_POST['styles'];
    $save = new css_style();
    $save->save_css($file, $cssDir, $styles);
    $debug = $save->debug();
    $debugErrorMsg = $save->debug_errorMsg();
    $debugSuccessMsg = $save->debug_successMsg();
    $textarea = $save->print_css_textarea($file, $cssDir);
    $highlight = $save->print_css_highlight($file, $cssDir);
}
if (isset($_POST['validate'])) {
    $validateCSS = urlencode($_POST['styles']);
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:31,代码来源:page.inc.php

示例10: sql

<?php

$mypage = "simple_shop";
$stats[0] = "<span style=\"color:red\">" . $I18N_SIMPLE_SHOP->msg("status_0") . "</span>";
$stats[1] = "<span style=\"color:orange\">" . $I18N_SIMPLE_SHOP->msg("status_1") . "</span>";
$stats[2] = "<span style=\"color:green\">" . $I18N_SIMPLE_SHOP->msg("status_2") . "</span>";
$sql = new sql();
if ($function == "delete") {
    $sql->setTable("rex_4_order");
    $sql->where("id=" . $aid . "");
    $sql->delete();
    $sql->setTable("rex_4_order_product");
    $sql->where("order_id=" . $aid . "");
    $sql->delete();
    $function = "";
}
if ($function == "edit_article" && $send == 1) {
    $sql->setTable("rex_4_order");
    $sql->setValue("status", $article[status]);
    $sql->where("id=" . $aid . "");
    $sql->update();
    $function = "";
}
if ($function == "edit_article") {
    $sql->setQuery("SELECT *,DATE_FORMAT(rex_4_order.date, '%d.%m.%Y %H:%i') as datum\r\n\tFROM rex_4_order LEFT JOIN rex_4_order_product ON rex_4_order.id = rex_4_order_product.order_id WHERE rex_4_order.id='" . $aid . "'");
    $mailtext = nl2br($sql->getValue("mailtext"));
    $status = $sql->getValue("status");
    echo "<a href=\"index.php?page=simple_shop&subpage=" . $subpage . "\" target=\"_self\">&#171; " . $I18N_SIMPLE_SHOP->msg("back_overview") . "</a><br /><br />\r\n\t\t\t<form action='index.php' method=post>\r\n\t\t\t<input type=hidden name='page' value='simple_shop' />\r\n\t\t\t<input type=hidden name='subpage' value='{$subpage}' />\r\n\t\t\t<input type=hidden name='clang' value='{$clang}' />\r\n\t\t\t<input type=hidden name='aid' value='" . $aid . "' />\r\n\t\t\t<input type=hidden name='function' value='edit_article' />\r\n\t\t\t<input type=hidden name='send' value='1' />\r\n\t\t\t<table width=770 border=0 cellpadding=5 cellspacing=1 />\r\n\t\t\t<tr>\r\n\t\t\t\t<th width=30>&nbsp;</th>\r\n\t\t\t\t<th colspan=2>" . $I18N_SIMPLE_SHOP->msg("header_order") . "</th>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=grey width=30>&nbsp;</td>\r\n\t\t\t\t<td class=grey width=170>" . $I18N_SIMPLE_SHOP->msg("date") . "</td>\r\n\t\t\t\t<td class=grey width=550>" . $sql->getValue("datum") . "</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=grey width=30>&nbsp;</td>\r\n\t\t\t\t<td class=grey width=170>" . $I18N_SIMPLE_SHOP->msg("customer") . "</td>\r\n\t\t\t\t<td class=grey width=550>" . $sql->getValue("name") . "</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=grey width=30>&nbsp;</td>\r\n\t\t\t\t<td class=grey width=170 valign=top>" . $I18N_SIMPLE_SHOP->msg("products") . "</td>\r\n\t\t\t\t<td class=grey width=550>";
    for ($i = 0; $i < $sql->rows; $i++) {
        echo $sql->getValue("amount") . " x " . $sql->getValue("product_name") . ", " . number_format($sql->getValue("price"), 2, ".", "") . "€ <br />";
        $sql->next();
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:orders.inc.php

示例11: sql

            }
            $msg .= " | ";
            $mode = "";
        }
    } else {
        $msg = $I18N->msg('pool_file_not_found');
        $mode = "";
    }
}
if ($media_method == 'edit_file') {
    $gf = new sql();
    $gf->setQuery("select * from rex_file where file_id='{$file_id}'");
    if ($gf->getRows() == 1) {
        $FILESQL = new sql();
        $FILESQL->setTable("rex_file");
        $FILESQL->where("file_id='{$file_id}'");
        $FILESQL->setValue("title", $ftitle);
        $FILESQL->setValue("description", $fdescription);
        $FILESQL->setValue("copyright", $fcopyright);
        $FILESQL->setValue("category_id", $rex_file_category);
        $FILESQL->setValue("stamp", time());
        $msg = "Dateiinformationen wurden aktualisiert!";
        $filename = $gf->getValue("filename");
        $filetype = $gf->getValue("filetype");
        if ($_FILES[file_new][name] != "" and $_FILES[file_new][name] != "none") {
            $filetype_ii = in_array($filetype, $imagetype);
            $ffilename = $_FILES[file_new][tmp_name];
            $ffiletype = $_FILES[file_new][type];
            $ffilesize = $_FILES[file_new][size];
            if ($ffiletype == $filetype) {
                unlink($REX[MEDIAFOLDER] . "/" . $filename);
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:medienpool.inc.php

示例12: sql

     $subject = str_replace("###LOGIN###", $gu->getValue("user_login"), $subject);
     $body = str_replace("###EMAIL###", $gu->getValue("user_email"), $body);
     $body = str_replace("###NAME###", $gu->getValue("user_name"), $body);
     $body = str_replace("###FIRSTNAME###", $gu->getValue("user_firstname"), $body);
     $body = str_replace("###LOGIN###", $gu->getValue("user_login"), $body);
     $body = str_replace("###PSW###", $gu->getValue("user_password"), $body);
     $mail->Subject = $subject;
     $mail->AltBody = $body;
     $mail->Send();
     echo "Mail wurde versendet<br /><br />";
     $aktionen = $mails[$mail_id]["action"];
     if (is_array($aktionen)) {
         $uu = new sql();
         $uu->debugsql = 0;
         $uu->setTable("rex_5_user");
         $uu->where("id='" . $oid . "'");
         foreach ($aktionen as $key => $value) {
             $uu->setValue($key, $value);
         }
         $uu->update();
         echo "Aktion/en wurden ausgeführt!<br /><br />";
     }
 } else {
     foreach ($mails as $key => $value) {
         echo "<br /><br /><a href=index.php?page=community&subpage=user&oid={$oid}&func=sendmail&subfunc=send&mail_id={$key}>&raquo; " . $value["name"] . "</a>";
     }
     echo "<br /><br />";
 }
 echo "</td></tr></table>";
 echo "<br /><table cellpadding=5 class=rex><tr><td><a href=index.php?page=" . $mypage . "&subpage=" . $subpage . "&func=edit&oid={$oid}><b>&laquo; Zurück zum User</b></a></td></tr></table>";
 $func = "nothing";
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:31,代码来源:user_email.inc.php

示例13: sql

<?php

title("<a href=index.php?page=community class=head>Community</a>: <a href=index.php?page=community&subpage=user class=head>Userverwaltung</a>", "");
if ($FUPD != "") {
    $updateuser = new sql();
    $updateuser->setTable("rex__user");
    $updateuser->where("id='{$user_id}'");
    $updateuser->setValue("psw", $upsw);
    $updateuser->setValue("email", $uemail);
    $updateuser->setValue("name", $uname);
    $updateuser->setValue("firstname", $ufirstname);
    if ($usex != "m" and $usex != "f") {
        $usex = "";
    }
    $updateuser->setValue("sex", $usex);
    $updateuser->setValue("street", $ustreet);
    $updateuser->setValue("zip", $uzip);
    $updateuser->setValue("city", $ucity);
    $updateuser->setValue("phone", $uphone);
    $updateuser->setValue("profession", $uprofession);
    $updateuser->setValue("size", $usize);
    $updateuser->setValue("wheight", $uwheight);
    $updateuser->setValue("singlestatus", $usinglestatus);
    $updateuser->setValue("color_eyes", $ucolor_eyes);
    $updateuser->setValue("color_hair", $ucolor_hair);
    $updateuser->setValue("posx", $uposx);
    $updateuser->setValue("posy", $uposy);
    $updateuser->setValue("file", $ufile);
    $updateuser->setValue("birthday", $ubirthday);
    $updateuser->setValue("interests", $uinterests);
    $updateuser->setValue("motto", $umotto);
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:user.inc.php

示例14: eval

     $CONT->setSliceId($slice_id);
     $CONT->setMode($mode);
     $CONT->setCLang($clang);
     $CONT->setCType($ctype);
     $CONT->setEval(TRUE);
     $CONT->setFunction($function);
     eval("?>" . $CONT->getArticle());
     // ------------------------------------------ END: MODULE EDITIEREN/ADDEN ETC.
 } elseif ($mode == "meta") {
     // ------------------------------------------ START: META VIEW
     $extens = "";
     if (isset($save) and $save == "1") {
         $meta_sql = new sql();
         $meta_sql->setTable($REX['TABLE_PREFIX'] . "article");
         // $meta_sql->debugsql = 1;
         $meta_sql->where("id='{$article_id}' and clang={$clang}");
         $meta_sql->setValue("online_from", mktime(0, 0, 0, $monat_von, $tag_von, $jahr_von));
         $meta_sql->setValue("online_to", mktime(0, 0, 0, $monat_bis, $tag_bis, $jahr_bis));
         $meta_sql->setValue("keywords", $meta_keywords);
         $meta_sql->setValue("description", $meta_description);
         $meta_sql->setValue("name", $meta_article_name);
         $meta_sql->setValue("type_id", $type_id);
         if (!isset($meta_teaser)) {
             $meta_teaser = 0;
         }
         $meta_sql->setValue("teaser", $meta_teaser);
         $meta_sql->setValue("updatedate", time());
         $meta_sql->setValue("updateuser", $REX_USER->getValue("login"));
         // -------------------------- FILE UPLOAD META BILD/FILE
         $meta_sql->setValue("file", $REX_MEDIA_1);
         // ----------------------------- / FILE UPLOAD
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:content.inc.php

示例15: sql

 if ($function == "add") {
     $ITPL = new sql();
     $ITPL->setTable("rex_template");
     $ITPL->setValue("name", $templatename);
     $ITPL->setValue("active", $active);
     $ITPL->setValue("content", $content);
     $ITPL->insert();
     $template_id = $ITPL->last_insert_id;
     $message = $I18N->msg("template_added");
 } else {
     if (!isset($active)) {
         $active = 0;
     }
     $TMPL = new sql();
     $TMPL->setTable("rex_template");
     $TMPL->where("id='{$template_id}'");
     $TMPL->setValue("name", $templatename);
     $TMPL->setValue("content", $content);
     $TMPL->setValue("active", $active);
     $TMPL->update();
     $message = $I18N->msg("template_added");
 }
 $gt = new sql();
 $gt->setQuery("SELECT * FROM rex_template WHERE id = '{$template_id}'");
 $fp = fopen($REX['INCLUDE_PATH'] . "/generated/templates/" . $template_id . ".template", "w");
 fputs($fp, $gt->getValue("content"));
 fclose($fp);
 if (isset($goon) and $goon != "") {
     $function = "edit";
     $save = "nein";
 } else {
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:template.inc.php


注:本文中的sql::where方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。