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


PHP Criteria::insert方法代碼示例

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


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

示例1: addAction

 public function addAction()
 {
     $post = new Criteria("post");
     $is_public = 0;
     if (isset($_POST["is_public"])) {
         $is_public = 1;
     }
     $post->insert(array("title" => "\"{$_POST['title']}\"", "content" => "\"{$_POST['content']}\"", "is_public" => $is_public, "created_at" => "NOW()"));
     Core::redir("./?r=blog/index");
 }
開發者ID:CloudGt,項目名稱:suggbox-php,代碼行數:10,代碼來源:BlogController.php

示例2: addAction

 public function addAction()
 {
     $criteria = new Criteria("person");
     $criteria->insert(array("no" => "\"{$_POST['no']}\"", "name" => "\"{$_POST['name']}\"", "lastname" => "\"{$_POST['lastname']}\"", "job" => "\"{$_POST['job']}\"", "phone1" => "\"{$_POST['phone1']}\"", "phone2" => "\"{$_POST['phone2']}\"", "address1" => "\"{$_POST['address1']}\"", "address2" => "\"{$_POST['address2']}\"", "email1" => "\"{$_POST['email1']}\"", "email2" => "\"{$_POST['email2']}\"", "team_id" => "\"{$_POST['team_id']}\"", "category_id" => "\"{$_POST['category_id']}\"", "created_at" => "NOW()"));
     Core::redir("./?r=team/open&id={$_POST['sucursal_id']}");
 }
開發者ID:CloudGt,項目名稱:suggbox-php,代碼行數:6,代碼來源:PersonController.php

示例3: Criteria

<?php

if (!empty($_POST)) {
    include "admin/app/autoload.php";
    include "admin/app/models/TeamData.php";
    include "admin/app/models/PersonData.php";
    $criteria = new Criteria("item");
    $criteria->insert(array("fullname" => "\"{$_POST['fullname']}\"", "phone" => "\"{$_POST['phone']}\"", "address" => "\"{$_POST['address']}\"", "kind" => "\"{$_POST['kind']}\"", "team_id" => "\"{$_POST['team_id']}\"", "msg" => "\"{$_POST['msg']}\"", "created_at" => "NOW()"));
    print "<script>alert(\"Mensaje enviado exitosamente.\");</script>";
    Core::redir("./");
}
開發者ID:CloudGt,項目名稱:suggbox-php,代碼行數:11,代碼來源:process.php

示例4: addcatAction

 public function addcatAction()
 {
     $criteria = new Criteria("category");
     $criteria->insert(array("name" => "\"{$_POST['name']}\""));
     Core::redir("./?r=index/categories");
 }
開發者ID:CloudGt,項目名稱:suggbox-php,代碼行數:6,代碼來源:TeamController.php


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