I get this error:
Fatal error: Call to a member function fetch_assoc() on boolean in C:\xampp\htdocs\cronjob\SQLreader.php on line 13
<?php
//readout Top10
// Hier mySQL - Zugangsdaten eingeben.
$servername = "*";
$username = "*";
$password = "*";
$db = "*";
$conn = new mysqli($servername, $username, $password, $db);
$user = $conn->query("SELECT * FROM btcstats ORDER BY kdr DESC LIMIT 10");
while($a = $user->fetch_assoc()) {
$file = fopen("statscache.txt", "w+");
fwrite($file, $a['uuid'] . "|" . $a['kills'] . "|" . $a['deaths'] . "|" . $a['gamesplayed'] . $a['gameswon'] . "|/n");
fclose($file);
}
So we've got a problem here, can some find the mistake ?