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


PHP CRUD::insert方法代码示例

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


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

示例1: add

 public static function add($newItem)
 {
     $val_description = $_POST[$newItem][0];
     $val_quantity = $_POST[$newItem][1];
     $val_price = $_POST[$newItem][2];
     $crud = new CRUD();
     $crud->insert(' itens ', ' description=?, qty=?, price=? ', array($val_description, $val_quantity, $val_price));
     return $crud;
 }
开发者ID:Jonathanrs1,项目名称:ShoppingCartExam2,代码行数:9,代码来源:ShoppingService.php

示例2: CRUD

<?php

include "model/_crud.mysqli.oop.php";
$crud = new CRUD("localhost", "root", "", "restoran");
$connection = mysql_connect("localhost", "root", "");
$db = mysql_select_db("restoran");
$nmor_meja = @$_POST['mm'];
$sql = mysql_query("SELECT * FROM meja where tmpmeja='{$nmor_meja}'");
$data = mysql_fetch_array($sql);
$cek = mysql_num_rows($sql);
if ($cek > 0) {
    header('location:index.php');
} else {
    session_start();
    @($_SESSION['nomor_meja'] = $nmor_meja);
    $data = array('no' => '', 'tmpmeja' => $nmor_meja);
    $crud->insert('meja', $data);
    header('location:menu.php');
}
?>

开发者ID:ramdan040295,项目名称:PRAKTIKUM_RPLL_SENIN,代码行数:20,代码来源:get_session_menu.php

示例3: explode

<?php

require_once "CRUD.php";
$req = '';
$text = '';
if ($_REQUEST["str"]) {
    $req .= $_REQUEST["str"];
    $params = explode("/", $req);
    $crud = new CRUD();
    $sucess = $crud->insert('Cliente', 'nome=?, telefone=?, email=?', array($params[0], $params[1], $params[2]));
}
//echo 'Done!';
开发者ID:Pedromborges,项目名称:Aguia-Dourada-M,代码行数:12,代码来源:myAjax.php

示例4: CRUD

<?php

include "../model/_crud.mysqli.oop.php";
$crud = new CRUD("localhost", "root", "", "restoran");
$keterangan = @$_POST['keterangan'];
$nama = @$_POST['nama'];
$gambar = @$_FILES['gambar']['tmp_name'];
$target = '../tampilan/img/';
$harga = @$_POST['harga'];
$nama_gambar = @$_FILES['gambar']['name'];
$pindah = move_uploaded_file($gambar, $target . $nama_gambar);
if ($pindah) {
    $data = array('nama' => $nama, 'gambar' => $nama_gambar, 'harga' => $harga, 'keterangan' => $keterangan);
    $crud->insert('makanan', $data);
    header('location:../admin.php');
} else {
    ?>
		<script type="text/javascript">
		alert('gambar gagal di upload');
		</script>
		
		<?php 
    echo "ada yang salah";
    echo "{$nama}";
    echo "{$gambar}";
    echo "{$harga}";
}
开发者ID:ramdan040295,项目名称:Tugasbesar_asli,代码行数:27,代码来源:tambah_makanan.php

示例5: CRUD

<?php

require_once "/../class/ConDB.class.php";
$pergunta = $_POST['pergunta'];
$resposta = $_POST['resposta'];
$crud = new CRUD();
$crud->insert('faq', 'pergunta=?, resposta=?', array($pergunta, $resposta));
print $pergunta;
开发者ID:andressafaria,项目名称:lab-VI-2015,代码行数:8,代码来源:jpInsert.php

示例6: explode

<?php

require_once "CRUD.php";
$req = '';
$text = '';
if ($_REQUEST["str"]) {
    $req .= $_REQUEST["str"];
    $params = explode("/", $req);
    $crud = new CRUD();
    $crud->insert('Cliente', 'Nome=?, Telefone=?, Email=?', array($params[0], $params[1], $params[2]));
}
开发者ID:Pedromborges,项目名称:Aguia-Dourada-M,代码行数:11,代码来源:salvarDadosCliente.php

示例7: CRUD

<?php

include "../model/_crud.mysqli.oop.php";
$crud = new CRUD("localhost", "root", "", "restoran");
$no = @$_POST['id'];
$nama = @$_POST['nama'];
$gambar = @$_FILES['gambar']['tmp_name'];
$banyak = @$_POST['banyak'];
$harga = @$_POST['harga'];
$nama_gambar = @$_FILES['gambar']['name'];
$jumlah = $harga * $banyak;
$mmeja = @$_POST['meja'];
$data = array('meja' => $mmeja, 'nama' => $nama, 'noo' => '', 'banyak' => $banyak, 'harga' => $harga, 'total' => $jumlah);
$crud->insert('keranjang', $data);
header('location:../menu.php');
开发者ID:ramdan040295,项目名称:PRAKTIKUM_RPLL_SENIN,代码行数:15,代码来源:tambah_keranjang.php

示例8: CRUD

<?php

include "../model/_crud.mysqli.oop.php";
$crud = new CRUD("localhost", "root", "", "restoran");
$nama = @$_POST['nama'];
$username = @$_POST['username'];
$password = @$_POST['password'];
$alamat = @$_POST['alamat'];
$telepon = @$_POST['telepon'];
$jabatan = @$_POST['jabatan'];
$data = array('nama' => $nama, 'username' => $username, 'password' => $password, 'alamat' => $alamat, 'telepon' => $telepon, 'jabatan' => $jabatan);
$crud->insert('pegawai', $data);
header('location:..admin.php');
开发者ID:ramdan040295,项目名称:Tugasbesar_asli,代码行数:13,代码来源:tambah_pegawai.php


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