本文整理汇总了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";
}
}
示例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"];
}
示例3: supprimer
public function supprimer()
{
$con = new connect();
$con->Query(" delete from admin where id ='{$this->id_client}' ");
}
示例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>
示例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">