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


PHP crud::insert方法代码示例

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


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

示例1: registraOpcao

 public function registraOpcao(array $opcoes)
 {
     parent::setTabela('sebraeprev_enquete_opcoes');
     $this->deleteOpcao();
     foreach ($opcoes as $opcao) {
         parent::sanitize($opcao);
         $resultado = parent::insert(array('titulo' => $opcao, 'id_enquete' => $this->id_enquete));
     }
     return $resultado;
 }
开发者ID:plusinterativa,项目名称:clientes,代码行数:10,代码来源:concurso.class.php

示例2: array

<?php

include "../../connection/phpmysqlconnect.php";
include "../../lib/CRUD_lib.php";
include "../../lib/miss_lib.php";
// post data
// File processing
$ext_array = array("jpeg", "jpg", "png");
$mime_array = array("image/jpeg", "image/jpg", "image/png");
$location = "../../media/featured_product/";
$image = new uploader();
if ($image->upload_validate($_FILES['files'], $ext_array, $mime_array) == true) {
    $image_name = $image->upload($_FILES['files'], $location);
    $column = array('logo');
    $value = array($image_name);
    $insert = new crud($conn, 'featured-product', $column, $value);
    $insert->insert();
    $move = new alert_redirect();
    $move->moveWithAlert('Logo has been added', '../../pages/distributor-logo.php');
}
$move->moveWithAlert('Error in uploading image', '../../pages/distributor-logo.php');
开发者ID:AbhishekShetty08,项目名称:mars-petrochem,代码行数:21,代码来源:featured_product.php

示例3: crud

    </div>
  </div>
   <div class="form-group"> 
    <div class="col-sm-offset-4 col-sm-8">
      <button type="submit" class="btn btn-lg btn-primary" name="submit" value="Submit">Submit</button>
    </div>
  </div>
  </form>
  </div>   
  </div>
</div></div>


<?php 
if (empty($nameErr) && empty($websiteErr) && empty($mpErr) && !empty($name) && !empty($website) && !empty($mp) && !empty($pubid) && empty($pubidErr) && empty($widgetErr) && !empty($widget2)) {
    $crud = new crud();
    $crud->insert($pubid, $name, $website, $piwik, $cache, $allowedParameters, $abtest, $mp, $widget2);
}
?>
<!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->


</body>
</html>

开发者ID:Vaibhav95g,项目名称:Bitsmun-user-management-portal,代码行数:29,代码来源:admin_insert.php

示例4: array

<?php

session_start();
// included files
include "../../../connection/phpmysqlconnect.php";
include "../../../library/CRUD_lib.php";
include "../../../library/miss_lib.php";
// post data
$user_id = $_POST['user_id'];
$name = $_POST['name'];
$role = 'customer';
$date_of_enrollment = $_POST['date_of_enrollment'];
$email = $_POST['email'];
$mobile = $_POST['mobile'];
$landline = $_POST['landline'];
$password = $_POST['password'];
$password = md5($password);
$modifier = $_SESSION["user"];
// insertion
$column = array('user_id', 'name', 'date_of_enrollment', 'email_id', 'mobile', 'landline', 'added_by', 'modified_by');
$value = array("{$user_id}", "{$name}", "{$date_of_enrollment}", "{$email}", "{$mobile}", "{$landline}", "{$modifier}", "{$modifier}");
$insert = new crud($conn, 'customer_details', $column, $value);
$insert->insert();
$column1 = array('user_id', 'role', 'password', 'added_by', 'modified_by');
$value1 = array("{$user_id}", "{$role}", "{$password}", "{$modifier}", "{$modifier}");
$insert1 = new crud($conn, 'login_details', $column1, $value1);
$insert1->insert();
$move = new alert_redirect();
$move->moveWithAlert('New User Customer has been added', '../../pages/add-customer.php');
开发者ID:samtherock,项目名称:Optamac_final,代码行数:29,代码来源:add_customer.php


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