当前位置: 首页>>代码示例>>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;未经允许,请勿转载。