I have a database, and I have PHP code to communicate with the database
$db = new PDO("mysql:host=localhost;dbname=$database;charset=utf8", $username, $password;
but nothing happens. It seems to connect (it doesn’t report an error when I try), but nothing happens on executing a query, and then the server just seems to stop reading PHP altogether.
Is there a way to access my 000 database from outside the site to make sure it works, or any other way to figure out what’s going on? I can access the database through PHPMyAdmin, but not from my own code, which worked perfectly fine on another host.
Like I said, no error, nothing. Edit: It’s as if the file just ends at $stmt->fetch();. Beyond it, nothing gets echoed. No HTML is displayed. The rest of the file is gone. It’s still there in the editor, but not in the generated source code.