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


PHP Conectar::Insertar_precio方法代码示例

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


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

示例1: Conectar

<?php

include_once 'conectar.php';
if (isset($_POST['inp_prod'], $_POST['slt_marca'], $_POST['std_referen'], $_POST['inp_prec'], $_POST['inp_cant'], $_POST['inp_desc_prod'])) {
    $conectar = new Conectar();
    $id = $_POST['inp_prod'];
    $marca = $_POST['slt_marca'];
    $refe = $_POST['std_referen'];
    $preci = $_POST['inp_prec'];
    $canti = $_POST['inp_cant'];
    $descrip = $_POST['inp_desc_prod'];
    $last_id_descrip = $conectar->Insertar_descripcion($descrip);
    $conectar->Insertar_precio($id, $preci);
    $exito = $conectar->Insertar_producto($id, $last_id_descrip['last_cod_id'], $marca, $refe, "null", $preci);
    //
    $last_id_canti = $conectar->Insertar_cantidad($id, $canti);
    if (isset($exito['exito'])) {
        echo json_encode($exito);
    }
}
// actualiza producto
include_once '../models/Productos.php';
if (isset($_POST['nombre'], $_POST['codigo'], $_POST['cost'], $_POST['cant'], $_POST['refe'], $_POST['marc'])) {
    $producto = new Productos();
    $nomb = $_POST['nombre'];
    $codi = $_POST['codigo'];
    $cost = $_POST['cost'];
    $cant = $_POST['cant'];
    $refe = $_POST['refe'];
    $marc = $_POST['marc'];
    $data = $producto->update_producto($codi, $nomb, $cost, $cant, $refe, $marc);
开发者ID:andres18281,项目名称:kit_motos,代码行数:31,代码来源:guardar_producto.php


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