function gquery($query) { $dbconn = getConnect(); $result = pg_query($dbconn, $query) or die('echec de la requete : ' . $query . ' ' . pg_last_error()); closeConnect(); return $result; }
function dropTable() { $myTable = useTable(); //the table we will be using $conn = initConnect(); $sql = "DROP TABLE {$myTable}"; if (mysqli_query($conn, $sql)) { echo "<b>" . $myTable . "</b> dropped"; } else { echo "Unable to drop <b>" . $myTable . "</b>"; } closeConnect($conn); }