Abrufen Sie Daten aus der Datenbank mit PDO ab
$host = 'localhost'; // URL to the server
$username = 'root'; // Username (xampp = root)
$password = ''; // Password (xampp = )
$dbname = 'apifile';
$pdo = new PDO("mysql:host=$host;dbname=$dbname", $username, $password);
$sql = "SELECT * FROM `prop` WHERE propkey='localhost_100100'";
$q = $pdo->query($sql);
$q->setFetchMode(PDO::FETCH_ASSOC);
$r = $q->fetch();
var_dump($r['propvalue']);
Amin Arjmand