'; print_r(pdo_drivers()); echo '
'; include 'adatok.php'; try { $conn = new PDO("pgsql:host=$host;port=$port;dbname=$adatbazis", $user, $jelszo); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // sql to delete a record $sql = "DELETE FROM MyGuests WHERE id=1"; // use exec() because no results are returned $conn->exec($sql); echo "Record deleted successfully"; } catch(PDOException $e) { echo $sql . "
" . $e->getMessage(); } $conn = null; ?>