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


PHP client::add方法代码示例

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


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

示例1: client

    $number = mysqli_real_escape_string($con, $_POST['number']);
    $end = mysqli_real_escape_string($con, $_POST['end']);
    $comp = mysqli_real_escape_string($con, $_POST['comp']);
    $sk = mysqli_real_escape_string($con, $_POST['sk']);
    $firstname = mysqli_real_escape_string($con, $_POST['firstname']);
    $lastname = mysqli_real_escape_string($con, $_POST['lastname']);
    $age = mysqli_real_escape_string($con, $_POST['age']);
    $exp = mysqli_real_escape_string($con, $_POST['exp']);
    $model = mysqli_real_escape_string($con, $_POST['model']);
    $year = mysqli_real_escape_string($con, $_POST['year']);
    $cc = mysqli_real_escape_string($con, $_POST['cc']);
    $cost = mysqli_real_escape_string($con, $_POST['cost']);
    $phonenumber = mysqli_real_escape_string($con, $_POST['phonenumber']);
    $op = mysqli_real_escape_string($con, $_POST['op']);
    $client = new client($number, $end, $comp, $sk, $firstname, $lastname, $age, $exp, $model, $year, $cc, $cost, $phonenumber, $op);
    $client->add();
}
if (isset($_POST['deleteclient'])) {
    $number = mysqli_real_escape_string($con, $_POST['number']);
    client::del($number);
}
/*
if (isset($_POST['index'])){
    if (isset($_POST['start']) && ($_POST['start']>0)){
        $con=dbconnect();
        $start = mysqli_real_escape_string($con, $_POST['start']);
        $sql= " ALTER TABLE clients AUTO_INCREMENT = $start;";
        if (!mysqli_query($con,$sql)) {
            die('Error: ' . mysqli_error($con));
        }
        mysqli_close($con);
开发者ID:kirfog,项目名称:telefonisk,代码行数:31,代码来源:base.php

示例2: client

<?php

//RECUPERACIO D'UNA TAULA LA BASE DE DADES//
////////////////////////////////////////////
//Carregar codi de la Classe client
require 'classes/client.class.php';
if ($_GET['action'] == 'ClientList') {
    //Instància de l'objecte
    $obj_client = new client();
    //Invocar mètode (Recollir tots les incidencies)
    $consulta = $obj_client->getClientList();
    //Cal que el primer index sigui 1 (per poder usar foreach en JS)
    for ($i = 1; $dades[$i] = mysql_fetch_array($consulta); $i++) {
    }
    array_pop($dades);
    //Eliminar l'últim ja que crea un últim element buid
    //Enviar capaçalera indicant JSON
    header('Content-type: application/json');
    //Codificar en JSON i retornar petició en un array entenible per JS
    echo json_encode($dades);
}
if ($_GET['action'] == 'InserirClient') {
    $client = json_decode($_GET['client']);
    $obj_client = new client();
    $obj_client->add($client);
}
开发者ID:sesiomterim,项目名称:BugNest,代码行数:26,代码来源:clients.php


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