PDO("mysql:host=localhost;dbname=name","user","pass"); file_put_contents('log', print_r($_POST, true)); $data = $db ->query("SELECT * FROM offers WHERE price =$payment_amount LIMIT 1"); $d = $data
PDO('mysql:host=127.0.0.1;dbname=espace_membre', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING)); $requser = $bdd->prepare("SELECT * FROM membres WHERE id = ?"); $requser->execute(array($_SESSION['id'])); $user = $requser
PDO::PARAM_INT); $query->bindValue(':conf','1',PDO::PARAM_INT); $query->bindValue(':id_c',$id_c,PDO::PARAM_INT); $query->execute(); if ($query->rowCount() == 0) { echo ' Vous n avez aucun
PDO::FETCH_ASSOC|PDO::FETCH_GROUP); ``` La requête me sort un tableau associatif comme suit : array (size=3) 1 => array (size=7) 0 => array (size=3) 'id_rayon' => string '1' (length
pdo->prepare("SELECT like_count, dislike_count FROM t_".$_POST['ref']." WHERE id_".$_POST['ref_id']." = ?"); $req->execute(array($_POST['ref_id'])); header('Content-type: application/json'); $record = $req->fetch(PDO
PDO('mysql:host=localhost;dbname=monappli;port=3308;charset=utf8','root',''); $bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (Exception $e) { die('Erreur : '. $e->getMessage()); } voici le code de connexion
PDO ('mysql:host=localhost;dbname=test','root','', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); $req = $bdd->prepare('INSERT INTO resultat(equipe, gp, avg, plus_zc, plus_uc, plus_dc, plus
PDO('mysql:host=localhost;dbname=gestion;charset=utf8','root',''); $bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { echo 'Échec lors de la connexion : ' . $e->getMessage(); } if(isset
PDO('mysql:host=localhost;dbname=AL;charset=utf8', 'root', '*********'); $req = "INSERT INTO `articles`(id, photo, categorie_id, titre, `date`, auteur_id, resume, content, trending, une, `datetime`) VALUES (NULL , 'try.jpg' , '".$catid
PDO('mysql:host=localhost;dbname=medrano2017;charset=utf8', 'root', ''); $bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch(Exception $e) { die('Erreur : '.$e->getMessage()); } $reponse = $bdd->query('SELECT id_event