本文整理汇总了PHP中db_connect::query方法的典型用法代码示例。如果您正苦于以下问题:PHP db_connect::query方法的具体用法?PHP db_connect::query怎么用?PHP db_connect::query使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类db_connect
的用法示例。
在下文中一共展示了db_connect::query方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete(){
$query = "DELETE FROM PLAN_TRAVAIL WHERE idPlanTravail = ".db_connect::escape_string($this->getIdPlanTravail());
if (db_connect::query($query))
return true;
return false;
}
示例2: delete
public function delete(){
$query = "DELETE FROM ELEVE_RESPONSABLE WHERE ".
"idEleve = ".$this->getIdEleve()." AND ".
"idResponsable = ".$this->getIdResponsable();
if (db_connect::query($query))
return true;
return false;
}
示例3: delete
public function delete(){
$query = "DELETE FROM EVALUATION_POINT_CPT WHERE idEvaluationPointCpt = ".$this->getIdEvaluationPointCpt();
if (db_connect::query($query))
return true;
return false;
}
示例4: delete
public function delete(){
$query = "DELETE FROM MATIERE_NIVEAU WHERE idMatiereNiveau = ".$this->getIdMatiereNiveau();
if (db_connect::query($query))
return true;
return false;
}
示例5: getAll
public static function getAll() {
$query = " SELECT c.* FROM CONNEXION c, UTILISATEUR u
WHERE c.idUtilisateur = u.idUtilisateur
AND u.actifUtilisateur = 1
ORDER BY loginUtilisateur ASC";
$result = db_connect::query($query);
$return = array();
while ($info = $result->fetch_object('Connexion')) {
$return[] = $info;
}
$result->close();
return $return;
//return $result->fetch_all();
}
示例6: update
public function update() {
$query = "UPDATE UTILISATEUR SET " .
" nomUtilisateur = '" . db_connect::escape_string(trim($this->getNomUtilisateur())) . "', " .
" prenomUtilisateur = '" . db_connect::escape_string(trim($this->getPrenomUtilisateur())) . "', " .
" adr1Utilisateur = '" . db_connect::escape_string(trim($this->getAdr1Utilisateur())) . "', " .
" adr2Utilisateur = '" . db_connect::escape_string(trim($this->getAdr2Utilisateur())) . "', " .
" cpUtilisateur = '" . db_connect::escape_string(trim($this->getCpUtilisateur())) . "', " .
" villeUtilisateur = '" . db_connect::escape_string(trim($this->getVilleUtilisateur())) . "', " .
" actifUtilisateur = " . ($this->getActifUtilisateur() ? 'true' : 'false') . ", " .
" mailUtilisateur = '" . db_connect::escape_string(trim($this->getMailUtilisateur())) . "', " .
" dateNaissanceUtilisateur = '" . db_connect::escape_string(trim($this->getDateNaissanceUtilisateur())) . "', " .
" dateInscriptionUtilisateur = '" . db_connect::escape_string(trim($this->getDateInscriptionUtilisateur())) . "'" .
" WHERE idUtilisateur = " . $this->getIdUtilisateur();
if (db_connect::query($query)) {
$connexion = Connexion::getById($this->getIdUtilisateur());
if (empty($connexion->getIdUtilisateur()))
$connexion->setIdUtilisateur($this->getIdUtilisateur());
$connexion->setLoginUtilisateur($this->getNomUtilisateur() . '.' . $this->getPrenomUtilisateur());
if (empty($connexion->getMdpUtilisateur()))
$connexion->setMdpUtilisateur('123Soleil');
return $connexion->update();
}
return FALSE;
}
示例7: delete
public function delete(){
$query = "DELETE FROM COMMUNICATION WHERE idCommunication = ".$this->idCommunication;
if (db_connect::query($query))
return true;
}
示例8: delete
public function delete()
{
$query = "DELETE FROM NIVEAU_CPT WHERE idNiveauCpt = " . $this->getIdNiveauCpt();
if (db_connect::query($query))
return TRUE;
return FALSE;
}
示例9: delete
public function delete(){
$query = "DELETE FROM CARNET_LIAISON WHERE idCarnetLiaison = ".$this->getIdCarnetLiaison();
if (db_connect::query($query))
return true;
return false;
}
示例10: delete
public function delete(){
$query = "DELETE FROM MODULE WHERE idModule = ".$this->getIdModule();
if (db_connect::query($query))
return true;
return false;
}
示例11: VALUES
<?php
require_once "db_conect.php";
/**
* Created by PhpStorm.
* User: chuli
* Date: 22/10/2015
* Time: 7:13 SA
*/
$task = $_POST["task"];
$id = $_POST["id"];
$hoten = $_POST["hoTen"];
$diaChi = $_POST["diaChi"];
$SDT = $_POST["SDT"];
$CMTND = $_POST["CMTND"];
$ghiChu = $_POST["ghiChu"];
$connect = new db_connect();
if ($task == "add") {
$sql = "INSERT INTO `quanlykhachsan`.`tblkhachhang` (`id`, `hoTen`, `diaChi`, `SDT`, `CMTND`, `ghiChu`) VALUES (NULL,' " . $hoten . " ', ' " . $diaChi . " ','" . $SDT . "','" . $CMTND . "','" . $ghiChu . "');";
}
if ($task == "edit") {
$sql = "INSERT INTO `quanlykhachsan`.`tblkhachhang` (`id`, `hoTen`, `diaChi`, `SDT`, `CMTND`, `ghiChu`) VALUES (NULL,' " . $hoten . " ', ' " . $diaChi . " ','" . $SDT . "','" . $CMTND . "','" . $ghiChu . "');";
}
if ($task == "trash") {
$sql = "DELETE FROM `quanlykhachsan`.`tblkhachhang` WHERE id =" . $id;
}
$connect->query($sql);
header("location: http://localhost/Quanlykhachsan");
示例12: delete
public function delete(){
$query = "DELETE FROM CAHIER_TEXTE WHERE idCahierTexte = ".$this->getIdCahierTexte();
if (db_connect::query($query))
return true;
return false;
}
示例13: delete
public function delete(){
$query = "DELETE FROM DOMAINE_CPT WHERE idDomaineCpt = ".$this->getIdDomaineCpt();
if (db_connect::query($query))
return true;
return false;
}
示例14: require_once
<?php
/**
* Created by PhpStorm.
* User: Jean-Baptiste
* Date: 26/10/2015
* Time: 21:31
*/
require_once('../Require/Objects.php');
$query = " select idEleve, mn.idMatiereNiveau
from ELEVE e, MATIERE_NIVEAU mn
WHERE e.idNiveau = mn.idMatiere
ORDER BY idMatiereNiveau asc";
$result = db_connect::query($query);
$return = array();
while ($info = $result->fetch_object('EleveMatiereNiveau')){
echo '<pre>';
var_dump($info);
echo '</pre>';
$info->insert();
}
$result->close();
db_connect::close();
示例15: delete
public function delete()
{
$query = "DELETE FROM POINT_CPT_ELEVE WHERE idPointCpt = " . $this->getIdPointCpt() . " AND idEleve = " . $this->getIdEleve() . " AND idTrimestre = " . $this->getIdTrimestre();
if (db_connect::query($query))
return true;
return false;
}