Bonjour tout le monde,

Un résultat bizarre me vient après des requêtes SQL. Voici le code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
<?php
// Connexion à la base de données
$pdo = new PDO('mysql:host=localhost;dbname=bdd', 'login', 'motdepasse');
// Lancer une exception en cas d'erreur
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
 
//$selectPartTriNom = 'SELECT Nom,Prénom FROM participants ORDER BY Nom LIMIT 0, 10';
$selectPartTriNom = 'SELECT Nom,Prénom FROM participants';
$participants = $pdo->query($selectPartTriNom);
 
	while ($participant = $participants->fetch())
	{
	    echo $participant['Nom'] + ' - ' + $participant['Prénom'];
	}
 
?>
Ce code m'affiche 000000000000000000.
Je ne comprend pas trop ce résultat vu que quand même j'ai pris soin de remplir la table auparavant avec insert into... par php.

Voilà.

En attendant votre aide, je vous remercie beaucoup en avance