當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。