hello,
I don’t understand the logic behind having to put the \ in this line.
<?php $reponse = $bdd->query('SELECT nom FROM jeux_video WHERE possesseur=\'Patrick\''); ?>I don’t get why it’s needed. if someone could enlight me it would be great.
<?php $bdd = new PDO('mysql:host=localhost;dbname=test', 'root', ''); $reponse = $bdd->query('SELECT nom FROM jeux_video WHERE possesseur=\'Patrick\''); ?>I got also a more conceptual question of something I don’t quiet understand. I get that there are variables, fonctions and array’s. But
$reponse = $bdd->query(‘SELECT nom FROM jeux_video’);
What is this ? I know what it does but is it a variable ? If so, I believe a variable store something in memory.
So there is the variable $response which equals the variable $bdd on which we apply the fonction query wich select everything in the table jeux_video? I’m kinda lost I think there is something I didn’t understand. especially that where i’m reading this the" ->" falls from nowhere without good explanation.
thanks for the help