trAvis Anonymous - MANAGER
Edit File: test.php
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Document sans titre</title> </head> <body> <? $servername = "placmanfdrjoomla.mysql.db"; $database = "placmanfdrjoomla"; $username = "placmanfdrjoomla"; $password = "Da13Go12"; // comptage try { $pdo = new PDO('mysql:host=placmanfdrjoomla.mysql.db;dbname=placmanfdrjoomla','placmanfdrjoomla','Da13Go12'); $sql = 'SELECT COUNT(*) AS result FROM resultats'; $result = $pdo->query($sql); $columns = $result->fetch(); $nb = $columns['result']; echo 'Il y a '.$nb.' enregistrement(s).'; } catch(PDOException $e) { echo 'Erreur PDO : '.$e->getMessage(); } ?> </body> </html>