当前位置: 首页>>代码示例>>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;未经允许,请勿转载。