本文整理汇总了PHP中Connexion类的典型用法代码示例。如果您正苦于以下问题:PHP Connexion类的具体用法?PHP Connexion怎么用?PHP Connexion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Connexion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update
public function update()
{
$connexion = new Connexion();
$sql = "";
$sql = "UPDATE \"libertribes\".\"CASE\" set coord = '" . $this->coord . "', occupee_par = '" . $this->occupee_par . "', occupant_id = '" . $this->occupant_id . "', nom_terrain = '" . $this->nom_terrain . "' ";
$sql .= "WHERE id = '" . $this->id . "'";
return $connexion->Requete($sql);
}
示例2: delete
public function delete($type, $id)
{
$db = new Connexion();
$class = $type;
$table = strtolower($class);
$prefixe = substr($table, 0, 3) . "_";
$query = "DELETE FROM " . $table;
$query .= " WHERE " . $prefixe . "id = " . $id;
$request = $db->query($query);
$db = null;
}
示例3: validationFormulaireSuppressionServices
function validationFormulaireSuppressionServices()
{
$id = $_POST['idServicesSuppr'];
$requete = 'Delete From services Where id = ' . $id . '';
Connexion::exec($requete);
echo '<META http-equiv="refresh" content="0; URL=?page=services&supprOk">';
}
示例4: getInstance
public static function getInstance()
{
if (is_null(self::$_instance)) {
self::$_instance = new Connexion();
}
return self::$_instance;
}
示例5: menuUtilisateur
function menuUtilisateur($menuParent_id = null)
{
$utilisateur = $_SESSION['utilisateur'];
$query = 'select * ' . 'from menu m, utilisateurtype_menu um ' . 'where um.utilisateurtype_id=' . $utilisateur['utilisateurtype_id'] . ' and m.id=um.menu_id';
if (is_null($menuParent_id)) {
$query .= ' and m.menuparent_id is null';
} else {
$query .= ' and m.menuparent_id=' . $menuParent_id;
}
$query .= ' order by um.ordre';
$menus = Connexion::table($query);
$html = '';
foreach ($menus as $menu) {
if ($menu['route'] == '') {
$url = '#';
} else {
$url = '.?route=' . $menu['route'];
}
$enfants = menuUtilisateur($menu['id']);
if ($enfants != '') {
$class = ' class="treeview"';
} else {
$class = '';
}
$html .= '<li' . $class . '>
<a href="' . $url . '">
<i class="fa ' . $menu['icon'] . '"></i> <span>' . $menu['label'] . '</span>
</a>';
if ($enfants != '') {
$html .= '<ul class="treeview-menu">' . $enfants . '</ul>';
}
$html .= '</li>';
}
return $html;
}
示例6: getAll
/**
* Fonction de récupération de l'ensemble des pages du site.
*
* Permet de récupérer l'ensemble des pages du site.
* @return results correspond à l'ensemble des pages trouvées.
*/
public static function getAll($niveau)
{
$querry = 'SELECT * FROM page WHERE droit<=:niveau';
Connexion::executeQuerry($querry, array(':niveau' => array($niveau, PDO::PARAM_INT)));
$results = Connexion::getResults();
return $results;
}
示例7: getAll
/**
* Fonction de récupéreration l'ensemble des adresse.
*
* Récupère l'ensemble des adresse de la table, cette fonction n'est pas utilisée pour le moment.
* @return result retourne le résultat de la recherche de l'adresse.
*/
public static function getAll()
{
$querry = 'SELECT * FROM adresse';
Connexion::executeQuerry($querry);
$results = Connexion::getResults();
return $results;
}
示例8: execute
public function execute()
{
$db = Connexion::getConnexion();
$statement = $db->prepare("DELETE FROM shows WHERE id = ?");
$statement->bindValue(1, $_POST["id"], PDO::PARAM_INT);
$statement->execute();
}
示例9: valid_route
function valid_route()
{
//Récupération du formulaire.
$nom = $_POST['nom'];
$prenom = $_POST['prenom'];
$adresse = $_POST['adresse'];
$codePostal = $_POST['codePostal'];
$ville = $_POST['ville'];
$mail = $_POST['mail'];
$numTel = $_POST['numTel'];
if ($_SESSION['utilisateur']['utilisateurtype_id'] == 1) {
$organisation = $_POST['organisation'];
$organisationRecupId = Connexion::queryFirst("SELECT id FROM organisation WHERE libelle='" . $organisation . "'");
$organisationId = $organisationRecupId['id'];
} else {
$organisationId = $_SESSION['utilisateur']['entreprise_id'];
}
$organisation = $_POST['organisation'];
$organisationId = Connexion::queryFirst("SELECT id FROM organisation where libelle='" . $organisation . "'");
//vérification si aucune zone de texte est restée vide pour envoi à la BDD.
if ($nom != "" and $prenom != "" and $adresse != "" and $codePostal != "" and $ville != "" and $mail != "" and $numTel != "") {
$query = 'INSERT INTO client (nom, prenom, adresse, codePostal, ville, entreprise_id, mail, numTelephone)' . "VALUES ('" . $nom . "', '" . $prenom . "', '" . $adresse . "', '" . $codePostal . "', '" . $ville . "','.{$organisationId['id']}.', '" . $mail . "', '" . $numTel . "')";
Connexion::exec($query);
include ROOT . 'AdminLTE/alerte.php';
} else {
$tableAjout = [$nom, $prenom, $adresse, $codePostal, $ville, $mail, $numTel, $organisation];
formulaire($tableAjout, true);
}
}
示例10: produit_route
function produit_route()
{
$produits = Connexion::table('SELECT libelleProduit,reference,fournisseur.nom,poids,produit.id
FROM produit, fournisseur
WHERE fournisseur.id=produit.fournisseur_id');
include ROOT . 'AdminLTE/kernel/produit/liste.php';
}
示例11: liste_route
function liste_route()
{
$employe = Connexion::table('select * from employe order by id');
$poste = Connexion::table('select * from poste');
$entreprise = Connexion::table('select * from organisation');
include ROOT . 'AdminLTE/grh/employe/liste.php';
}
示例12: getAdwordsData
public function getAdwordsData()
{
$targetingIdeaService = $this->user->GetService('TargetingIdeaService', ADWORDS_VERSION);
$selector = new TargetingIdeaSelector();
$selector->requestType = 'STATS';
$selector->ideaType = 'KEYWORD';
$selector->requestedAttributeTypes = array('SEARCH_VOLUME', 'COMPETITION');
$selector->paging = new Paging(0, AdWordsConstants::RECOMMENDED_PAGE_SIZE);
$selector->localeCode = 'fr_FR';
$selector->currencyCode = 'EUR';
$language = new Language();
$language->id = '1002';
$selector->searchParameters[] = new LanguageSearchParameter($language);
$relatedToQuerySearchParameter = new RelatedToQuerySearchParameter();
$relatedToQuerySearchParameter->queries = $this->keyword['keyword'];
$selector->searchParameters[] = $relatedToQuerySearchParameter;
$page = $targetingIdeaService->get($selector);
if (sizeof($page->entries) > 0) {
$vol = $page->entries[0]->data[0]->value->value == 0 ? 5 : $page->entries[0]->data[0]->value->value;
$comp = (double) round($page->entries[0]->data[1]->value->value, 2);
Connexion::getInstance()->query("UPDATE keyword SET search = '" . $vol . "', competition = '" . round($comp, 2) . "' WHERE id_keyword = '" . $this->keyword['id_keyword'] . "' ");
} else {
Connexion::getInstance()->query("UPDATE keyword SET search = '5', competition = '0' WHERE id_keyword = '" . $this->keyword['id_keyword'] . "' ");
}
}
示例13: __construct
public function __construct($immatricule, $nom, $prenom, $zone)
{
$this->con = Connexion::connect();
$this->immatricule = $immatricule;
$this->nom = $nom;
$this->prenom = $prenom;
$this->zone = $zone;
}
示例14: __construct
public function __construct($dbhost, $dbname, $user, $password)
{
$this->host = $dbhost;
$this->dbname = $dbname;
$this->user = $user;
$this->password = $password;
$this->bdd = Connexion::getConnexion($dbhost, $dbname, $user, $password);
}
示例15: connect
function connect()
{
if (!$this->connected) {
parent::__construct($this->connexion->getDns(), $this->connexion->getUserName(), $this->connexion->getPassWord(), $this->connexion->getOptions());
$this->connected = true;
}
return $this;
}