當前位置: 首頁>>代碼示例>>PHP>>正文


PHP connect::Query方法代碼示例

本文整理匯總了PHP中connect::Query方法的典型用法代碼示例。如果您正苦於以下問題:PHP connect::Query方法的具體用法?PHP connect::Query怎麽用?PHP connect::Query使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在connect的用法示例。


在下文中一共展示了connect::Query方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: inscrire

 function inscrire($nom, $prenom, $email, $pwd, $state)
 {
     $con = new connect();
     if ($con->Query(" insert into admin (email,password) values ('{$email}','{$pwd}') ")) {
         $a = $con->Query("select * from admin where email='{$email}' ");
         $data = $a->fetch_array();
         $this->id_client = $data["id"];
         $RIB = $this->generateID();
         $con->Query(" insert into client (nom,prenom,id_client,state,RIB,solde) values ('{$nom}','{$prenom}','{$this->id_client}','{$state}','{$RIB}','0') ");
         echo "registered with success";
     } else {
         echo "fail to insert";
     }
 }
開發者ID:ihebBenSalem,項目名稱:TNP_web,代碼行數:14,代碼來源:client.php

示例2: state

function state($ch)
{
    $con = new connect();
    $rs = $con->Query(" select * from admin,client where email='{$ch}' and admin.id=client.id_client ");
    $data = $rs->fetch_array();
    return $data["state"];
}
開發者ID:ihebBenSalem,項目名稱:TNP_web,代碼行數:7,代碼來源:login.php

示例3: supprimer

 public function supprimer()
 {
     $con = new connect();
     $con->Query(" delete from admin where id ='{$this->id_client}' ");
 }
開發者ID:ihebBenSalem,項目名稱:TNP_web,代碼行數:5,代碼來源:agent.php

示例4: connect

<?php

require_once "../lib/connect.php";
session_start();
$id = $_SESSION["login"];
$con = new connect();
$nom = "";
$prenom = "";
$solde = "";
$RIB = "";
$request = $con->Query(" select * from client where id_client='{$id}' ");
while ($data = $request->fetch_array()) {
    # code...
    $nom = $data["nom"];
    $prenom = $data["prenom"];
    $RIB = $data["RIB"];
    $solde = $data["solde"];
}
?>



<link rel="stylesheet" type="text/css" href="/src/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/src/bootstrap/css/material.min.css">
<link rel="stylesheet" type="text/css" href="/src/adminLTE/adminLTE.min.css">
<link rel="stylesheet" type="text/css" href="/src/adminLTE/skin-red-light.css">
<style type="text/css">
body{
	background-color: #E5E5E5;
}
></style>
開發者ID:ihebBenSalem,項目名稱:TNP_web,代碼行數:31,代碼來源:welcome.php

示例5: connect

<?php

require_once "../lib/connect.php";
session_start();
$id = $_SESSION["login"];
$con = new connect();
$nom = "";
$prenom = "";
$solde = "";
$RIB = "";
$request = $con->Query(" select * from client where id_client='{$id}' ");
while ($data = $request->fetch_array()) {
    # code...
    $nom = $data["nom"];
    $prenom = $data["prenom"];
    $RIB = $data["RIB"];
    $solde = $data["solde"];
}
if (isset($_POST["del"]) && !empty($_POST["del"])) {
    # code...
    $del_client = $_POST["del"];
    $con->Query(" delete from admin where id='{$del_client}' ");
}
?>



<link rel="stylesheet" type="text/css" href="/src/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/src/bootstrap/css/material.min.css">
<link rel="stylesheet" type="text/css" href="/src/adminLTE/adminLTE.min.css">
<link rel="stylesheet" type="text/css" href="/src/adminLTE/skin-red-light.css">
開發者ID:ihebBenSalem,項目名稱:TNP_web,代碼行數:31,代碼來源:admin.php


注:本文中的connect::Query方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。