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


PHP db_connect::query方法代碼示例

本文整理匯總了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;
	}
開發者ID:roger-jb,項目名稱:edeip,代碼行數:6,代碼來源:PlanTravail.php

示例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;
	}
開發者ID:roger-jb,項目名稱:edeip,代碼行數:8,代碼來源:EleveResponsable.php

示例3: delete

	public function delete(){
		$query = "DELETE FROM EVALUATION_POINT_CPT WHERE idEvaluationPointCpt = ".$this->getIdEvaluationPointCpt();
		if (db_connect::query($query))
			return true;
		return false;
	}
開發者ID:roger-jb,項目名稱:edeip,代碼行數:6,代碼來源:EvaluationPointCpt.php

示例4: delete

	public function delete(){
		$query = "DELETE FROM MATIERE_NIVEAU WHERE idMatiereNiveau = ".$this->getIdMatiereNiveau();
		if (db_connect::query($query))
			return true;
		return false;
	}
開發者ID:roger-jb,項目名稱:edeip,代碼行數:6,代碼來源:MatiereNiveau.php

示例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();
  }
開發者ID:roger-jb,項目名稱:edeip,代碼行數:15,代碼來源:Connexion.php

示例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;
	}
開發者ID:roger-jb,項目名稱:edeip,代碼行數:24,代碼來源:Utilisateur.php

示例7: delete

	public function delete(){
		$query = "DELETE FROM COMMUNICATION WHERE idCommunication = ".$this->idCommunication;
		if (db_connect::query($query))
			return true;
	}
開發者ID:roger-jb,項目名稱:edeip,代碼行數:5,代碼來源:Communication.php

示例8: delete

 public function delete()
 {
     $query = "DELETE FROM NIVEAU_CPT WHERE idNiveauCpt = " . $this->getIdNiveauCpt();
     if (db_connect::query($query))
         return TRUE;
     return FALSE;
 }
開發者ID:roger-jb,項目名稱:edeip,代碼行數:7,代碼來源:NiveauCpt.php

示例9: delete

	public function delete(){
		$query = "DELETE FROM CARNET_LIAISON WHERE idCarnetLiaison = ".$this->getIdCarnetLiaison();
		if (db_connect::query($query))
			return true;
		return false;
	}
開發者ID:roger-jb,項目名稱:edeip,代碼行數:6,代碼來源:CarnetLiaison.php

示例10: delete

	public function delete(){
		$query = "DELETE FROM MODULE WHERE idModule = ".$this->getIdModule();
		if (db_connect::query($query))
			return true;
		return false;
	}
開發者ID:roger-jb,項目名稱:edeip,代碼行數:6,代碼來源:Module.php

示例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");
開發者ID:WHTGo,項目名稱:EXP-Training,代碼行數:28,代碼來源:DAL_KhachHang.php

示例12: delete

	public function delete(){
		$query = "DELETE FROM CAHIER_TEXTE WHERE idCahierTexte = ".$this->getIdCahierTexte();
		if (db_connect::query($query))
			return true;
		return false;
	}
開發者ID:roger-jb,項目名稱:edeip,代碼行數:6,代碼來源:CahierTexte.php

示例13: delete

	public function delete(){
		$query = "DELETE FROM DOMAINE_CPT WHERE idDomaineCpt = ".$this->getIdDomaineCpt();

		if (db_connect::query($query))
			return true;
		return false;
	}
開發者ID:roger-jb,項目名稱:edeip,代碼行數:7,代碼來源:DomaineCpt.php

示例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();
開發者ID:roger-jb,項目名稱:edeip,代碼行數:25,代碼來源:majEleveMatiereNiveau.php

示例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;
	}
開發者ID:roger-jb,項目名稱:edeip,代碼行數:7,代碼來源:PointCptEleve.php


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